Where in known fiction entailing magic—including written and oral forms predating the novel—did the concept of a magical sword first appear? Answers should clearly distinguish between any magic of the wielder and the magic of the sword itself.
Clarification: In response to a point made in chat by @Axelrod, I am using the "history-of" tag because I am interested in the history of the idea or trope of the magic sword, not in any history of actual magic swords.