Evidence suggests that the magnetic compass was invented in China between 221 and 206 B.C. The earliest compasses were not used for navigation, but for fortune-telling. Chinese compasses became navigational orienteering devices between 1040 and 1044 A.D. and were used as maritime navigational devices by 1117 A.D.
The first magnetic compass appeared in Europe by the early 14th century, but it is unclear if it was introduced to Europe from China or invented independently. Before the introduction of the magnetic compass, most Europeans relied on celestial navigation and astronomy, or in the case of the Vikings, a crystal called the sunstone.