The epic poem Havamal,written around the 9th century,records how Odin discovered the runes and their magical powers,thereby earning his title of god of magic...
Odin's Discovery Of The Runes
Wounded i hung on a windswept gallows tree for nine long nights,
Pierced by a spear,pledged to Odin,
Sacrificed,myself to myself,
The wisest know not from whence spring
The roots of that ancient wood.
No bread was I given,
No mead was I given.
I perceived the depths: With a loud cry
I seized the runes,then from that tree I fell.
Nine ways of power
I learned from the famous Bolthorn,Bestla's father;
He poured me a draft of precious mead,
Mixed with magic Odhroerir:
I waxed and throve well;
Word from word gave words to me,
Deed from deed gave deeds to me,
Runes you will find,and readable staves,
Very strong staves,very stout staves,
Staves that Bolthorn stained,
Made by mighty powers,
Graven by the prophetic god;
For the gods by Odhinn,for the elves by Dain,
By Asvid for the hateful gaints,
And some I carved myself:
Thund,before man was made,scratched them,
Who rose first,fell thereafter.
Know how to cut them,know how to read them,
Know how to stain them,know how to prove them,
Know how to evoke them,know how to score them,
Know how to send them,Know how to spend them.