A 5,000-year-old monument that aligns with the summer and winter solstices and may have served as a prototype for Stonehenge's later solar alignment has been discovered near the famous neolithic site in Wiltshire. Archaeologists are calling it a "once in a lifetime" find, which is the archaeological equivalent of a mic drop.

The structure at Bulford, 5km (3 miles) from the world heritage site, has been carbon dated to around 3000BC - the same time as the earliest phase of Stonehenge construction. That's 500 years before the iconic trilithon stones were carefully positioned to catch the midsummer and midwinter sun. So basically, this wooden pole setup was the beta version.

It's the earliest solstice-aligned structure in the Wiltshire landscape and one of the very first in Britain, according to experts. Archaeologist Phil Harding, who led the dig for Wessex Archaeology before new Ministry of Defence housing went up, described it as "one of the greatest finds of my career." But he nearly missed it entirely. Unlike Stonehenge's still-standing sarsen boulders, the Bulford monument consisted of two wooden poles 120 metres apart, leaving only two large post pits surrounded by smaller rubbish pits.

Harding, a former presenter on Channel 4's Time Team, said the discovery only clicked when he later drew a line between the two anomalous postholes. "The thing that struck me as soon as I saw that was that [the line was] about 50 degrees off the direct north, which was pretty much the line of the midsummer sunrise. And so I got really, really excited about that."

Fabio Silva, a "skyscape archaeologist" (yes, that's a real job title), confirmed the poles accurately lined up with the midsummer sunrise and midwinter sunset in 2950BC, based on extensive radiocarbon analysis. The team thinks the poles stood 3-4 metres high, based on the 1-metre-deep post pits, and served as a "gunsight" for solstice events. A smaller pit aligned with the poles contained a rare disc-shaped flint knife, possibly shaped to represent the sun - because nothing says "sun worship" like a sharp rock.

"What we're seeing here is the religion of the stone age made manifest in the ground," said Matt Leivers, senior research manager at Wessex Archaeology. "Obviously we have no understanding of precisely what any of it meant, but the fact that time and again, over thousands of years, people are coming back to [the Stonehenge landscape] to build and rebuild and mark and remark this set of substantial events - it gives us an indication that this is religion."

Leivers said it's "inconceivable" that those commemorating solstices at Bulford were unaware of Stonehenge's similar celebrations - they may have been the same people. "If you had a time machine and went back, I wouldn't be at all surprised if what we have found is one of the campsites of the builders of the first phase of Stonehenge. I think that's entirely plausible."

"Sites like this come along once in a lifetime, sometimes they don't come along at all," said Harding. "It doesn't matter whether you are a resident of Wiltshire or a resident of the Earth - everybody knows about Stonehenge. And to be able to contribute something to expanding our knowledge of Stonehenge is an incredible privilege."