They were the stone-age equivalent of Glastonbury festival. People gathered in their hundreds to drink, eat and party every summer at revelries lasting several days and nights. Young men met women from nearby communities and married them. Herds of cattle were slaughtered to provide food.

These neolithic carousals even had special sites. They were held on causewayed enclosures, large hilltop earthworks built by our forebears after they brought farming to Britain from the continent 6,000 years ago.

This picture of ancient British bacchanalia has been created by researchers led by Professor Alasdair Whittle of Cardiff University and Dr Alex Bayliss of English Heritage. Using a revolutionary technique for dating ancient remains, they have built up a detailed chronology of the first farmers' arrival in Britain and have shown that agriculture spread with dramatic rapidity. In its wake, profound social changes gripped the country, culminating in the construction of causewayed enclosures where chieftains or priests held revelries to help establish their power bases.

Until recently, archaeologists had an imprecise knowledge of the timing of agriculture's arrival in Britain. "We knew the first long-barrow chambers, often used for communal burials, and the first causewayed enclosures appeared not long after the first farmers started taking over the land from existing hunter-gatherer tribes," said Bayliss. "But we thought these processes took hundreds of years. In fact, they took about a tenth of that. Armed with this precise sequence, we can understand the social and political revolution that happened with agriculture's arrival."

The technique developed by the team is known as Bayesian chronological modelling; it exploits the theorems of the 18th-century mathematician Thomas Bayes to bring new precision to radiocarbon dating of prehistoric samples. In the past, bones or pieces of wood could only be ascribed dates to within a few hundred years. "Now, in many cases, we can date bones or tools with an accuracy of only a couple of decades. That changes everything," said Whittle.

As a result of their successes, Whittle and Bayliss have won a £2m grant from the European Research Council to date neolithic sites across the continent. The aim is to show the technique's power to create precise chronologies of ancient events, as it has for stone-age Britain.

The first farmers arrived in Britain from France and appeared in Kent around 4050BC. At first, agriculture spread very slowly — by 3900BC farming had only reached the Cotswolds. Then it went through a period of explosive growth. Within 50 years it had spread across almost all of mainland Britain, reaching as far as Aberdeen. "Presumably a critical mass of farming folk had arrived in Britain while our native hunter-gatherers had seen the game was up and turned to agriculture and a sedentary way of life," said Whittle.

Once farming was established, ideas were imported from the continent in its wake. First came long barrows, distinctive earth mounds which are often found to contain human remains. They appeared around 3800BC. Then, in 3700BC, came causewayed enclosures. "The difference between the two structures is critical," said Bayliss. "An extended family could build a long barrow in a summer. It would have taken several hundred men to build a causewayed enclosure."

In a century, society had changed profoundly from the days when a few isolated farmsteads celebrated their clan links with communal burial grounds. "Chieftains or religious leaders had causewayed enclosures built. Hundreds of people would have been involved. Then they used them for celebrations that bound these people to a common cause," said Bayliss. "Huge festivals were held. We also know from digs at the enclosure at Hambledon Hill in Dorset that festivals there were held in August or September, to judge from the condition of the teeth of the cattle that were slaughtered there. The man who ran these celebrations would have been very powerful, it is clear.

"The crucial point is that, until we developed this precision in dating, we had no idea of the chronology of neolithic Britain and could not make sense of its of politics. Now we understand a lot more."