The Vikings were great seafarers, and their sun compass was so advanced it even worked after dark. The trick behind it? Magic! Clever engineering and crystals.

According to researchers who examined the Uunartoq disc - a fragment of a Viking sun compass discovered in a medieval convent in Greenland 70 years ago, the 2.8 inch disc was assumed to be part of a compass that used a missing central piece to cast a shadow using cardinal direction.

The Hungarian team posits that the Vikings used a pair of sunstones to help locate the position of the hidden sun. They used a specially designed shadow stick placed on the disc to approximate where an actual shadow would fall if the sun was visible. The outer edge of the shadow would be used for navigation.

The researchers were able to locate true north within a 4 degree margin of error using the twilight compass. They estimate that the method works for as long as 50 minutes after sunset too, making the ancient compass pretty damn useful in both light and near darkness.

The crystals that they used are made of a type of calcite known as Iceland spar, which is a birefringent mineral that creates a unique pattern when exposed to the sun's UV rays.

[Proceedings of the Royal Society A via LiveScience]