Mystery has long surrounded the hundreds of ancient stone monuments found in Britain, from Stonehenge to Castlerigg in the Lake District.

But for the first time, archaeologists have been able to prove the two oldest stone circles in the country were deliberately constructed to align with the orbits of the sun and the moon.

Callanish Stones on the Isle of Lewis in Scotland and the Standing Stones of Stenness on the Isle of Orkney were constructed about 5,000 years ago with astronomical phenomena in mind, according to new research from the University of Adelaide.

Gail Higginbottom and her colleagues studied Ordnance Survey data and used 3D mapping technology to scrutinise the statistics behind the prehistoric stones’ alignment.

“It’s the first time individual circles have been assessed to really know what’s going on,” Dr Higginbottom told The Independent.

“People have done statistical work on standing stones, but usually as a group. They hadn’t separated them by specific age, or by looking at every single lineup in a circle.”

The Stones of Stenness (Getty/iStockphoto) (Getty Images/iStockphoto)

The research, published in the Journal of Archaeological Science, found the stones positioned to connect with the path of the sun and moon at different points in their cycle.

While the monuments themselves were built relatively quickly, their positioning was based on knowledge about the movements of the cosmos gathered over several generations.

And the arrangement of the stones in the two locations is so precise that they can even be used to measure the moon’s appearance at its most northerly position on the horizon – an event which only takes place every 18.6 years.

Stenness is situated near the Ness of Brodgar, the largest ancient temple complex in the UK dating from about 3200 BC, and the prehistoric settlement of Skara Brae from the same era.

The spiritual significance of “connecting the earth and the sky” using astrologically-placed standing stones may have remained the same for two whole millennia.

“It was important for them to do alignments as it was part of their wider belief system,” said Dr Higginbottom of the Neolithic populations who first created the structures.

“Around the winter solstice, as the sun was moving further south, and it was getting darker and the days were getting shorter, if they couldn’t confirm that the sun was starting to move north again, towards warmer weather, that would be catastrophic.”

Skara Brae in Orkney, Scotland, the best-preserved Neolithic settlement in Western Europe (Getty/iStockphoto) (Getty Images/iStockphoto)

The archaeologists used the data to examine landscape patterns at more than 100 of the earliest standing stone structures in Britain.

They discovered that at about half of the locations, the northern horizon was relatively higher and closer, with the summer solstice sun rising from the highest peak in the north.

But at the other half, the southern horizon was elevated, with the sun rising from the highest peak in the south during the winter solstice.

This meant the Neolithic people were able to predict when these “amazing spectaculars” would take place, said Dr Higginbottom.

“They had to be aware of their environment, for survival, but it was also quite magical.”

Callanish and Stenness were built about 500 years before Stonehenge in Wiltshire, where crowds continue to gather to mark the summer solstice each year at dawn on 21 June.

Revealed: Early Bronze Age carvings suggest Stonehenge was a huge prehistoric art gallery Show all 4 1 /4 Revealed: Early Bronze Age carvings suggest Stonehenge was a huge prehistoric art gallery Revealed: Early Bronze Age carvings suggest Stonehenge was a huge prehistoric art gallery 11.jpg Digital photogrammetry being used to record 3D images of the micro-topography on the tops of the lintels at Stonehenge. ArcHeritage/English Heritage Revealed: Early Bronze Age carvings suggest Stonehenge was a huge prehistoric art gallery 1.jpg Ghostly images: a laser-scan-derived image of the largest panel of axe-head carvings at Stonehenge. 75% of the carvings in this image were not previously known. ArcHeritage/English Heritage Revealed: Early Bronze Age carvings suggest Stonehenge was a huge prehistoric art gallery 2.jpg Drawings of all the axe-heads shown in the laser-scan-derived image. The green ones are new discoveries. The brown ones have been known or suspected since the 1950s. ArcHeritage/English Heritage Revealed: Early Bronze Age carvings suggest Stonehenge was a huge prehistoric art gallery 3.jpg Digital photogrammetry being used to record 3D images of the micro-topography on the tops of the lintels at Stonehenge. ArcHeritage/English Heritage

The structures are also much simpler than Stonehenge, which attracts hundreds of thousands of visitors every year and in 2013 celebrated the opening of a new £27m visitor centre.

“We are planning to investigate Stonehenge, but we wanted to get it right with something simpler first,” said Dr Higginbottom.