The chance discovery of a mass grave crammed with the battered skeletons of ancient Europeans has shed light on the lethal violence that tore through one of the continent’s earliest farming communities.

In 2006, archaeologists were called in after road builders in Germany uncovered a narrow ditch filled with human bones as they worked at a site in Schöneck-Kilianstädten, 20km north-east of Frankfurt.

They have now identified the remains as belonging to a 7000-year-old group of early farmers who were part of the Linear Pottery culture, which gained its name from the group’s distinctive style of ceramic decoration.

In the seven metre-long, V-shaped pit, researchers found the skeletons of 26 adults and children, who were killed by devastating strikes to the head or arrow wounds. The skull fractures are classic signs of blunt force injuries caused by basic stone age weapons.

Along with close-quarter fighting, attackers used bows and arrows to ambush their neighbours. Two arrowheads made of animal bone were found in the soil stuck to the skeletons. They are thought to have been inside the bodies when they were placed in the pit.

More than half of the individuals had their legs broken in acts of apparent torture or posthumous mutilation. The smashed-in shin bones could represent a new form of violent torture not seen before in the group.

A fractured adult shin bone from the mass grave, which could indicate torture or posthumous mutilation. Photograph: Christian Meyer

In the Linear Pottery culture, each person was given their own grave within a cemetery, the body carefully arranged and often buried with grave goods such as pottery and other possessions. By contrast, in the mass grave the bodies lay scattered.

Christian Meyer, an archaeologist who led the study at the University of Mainz, believes the attackers meant to terrorise others and demonstrate that they could annihilate an entire village. The site of the mass grave, which dates back to about 5000BC, is located near an ancient border between different communities, where conflict was likely.

In the 1980s, a number of similar mass graves were found in Talheim, Germany, and Asparn, Austria. The latest grim discovery bolsters evidence for prehistoric warfare in the final years of the culture, and points to torture and mutilation not recorded before.

“This is a classic case where we find the ‘hardware’: the skeletal remains, the artefacts, everything that is durable we can find in the graves. But the ‘software’: what people were thinking, why they were doing things, what their mindset was at this time, of course was not preserved,” Meyer said.

The scientists’ best guess is that a small farming village was massacred and thrown into a pit nearby. The skeletons of young women were absent from the grave, which suggests that the attackers may have taken the women captive after killing their families .

It is likely that fighting broke out over limited farming resources, upon which people depended for survival. Unlike their nomadic hunter-gatherer ancestors, people of the Linear Pottery culture settled into a farming lifestyle. Communities cleared forests to farm crops and lived in timber longhouses alongside their livestock.

The landscape soon became full of farming communities, putting a strain on natural resources. Along with adverse climate change and drought, this led to tension and conflict. In acts of collective violence, communities would come together to massacre their neighbours and take their land by force.

Lawrence Keeley, an anthropologist at the University of Illinois in Chicago, said that alongside Talheim and Asparn, this latest massacre discovery fits a pattern of common and murderous warfare. “The only reasonable interpretation of these cases, as here, is that a whole typically-sized Linear Pottery culture hamlet or small village was wiped out by killing the majority of its inhabitants and kidnapping the young women. This represents yet another nail in the coffin of those who have claimed that war was rare or ritualised or less awful in prehistory or, in this instance, the early Neolithic.”

But he is doubtful that the victims’ legs were broken through acts of torture. “Torture focuses on the parts of the body with the most nerve cells: the feet, pubis, hands and head. I can’t think of anywhere that torture involved breaking the tibia.

“This is rank speculation, but there are ethnographic instances of disabling the ghost or spirits of the dead, especially enemies. Such mutilations were done to prevent enemy spirits from following home, haunting or doing mischief to the killers. These motives seem most likely to me. Or perhaps it was done to further revenge by crippling the enemy’s spirits in the afterlife,” he added.