Many of the people sacrificed in ritual killings more than 3,000 years ago in China were enslaved prisoners of war, archaeologists say.

Their skeletons, buried at the ancient Yinxu archaeological site, tell a story of victims in a foreign land who survived at least a few years before being killed. Scientists studied the composition of their bones to reconstruct their diets, a study in the Journal of Anthropological Archaeology said, to determine their origin. That involved looking at the elements present in the bones of 68 human sacrifices — rather than their teeth because they had been decapitated — and comparing them to the remains of a few dozen locals from the same ancient place. The results suggest the victims “moved to Yinxu and adopted the local diet for at least a few years before being killed.”

Read: An Ancient Society Obsessed with Feet

The human sacrifices lived during China’s Shang Dynasty, which ran roughly 1600 B.C. to 1000 B.C., during the early Bronze Age. About halfway through the dynasty, the kings took residence at what is now the city of Anyang in Henan province in eastern China. That Shang capital was the ancient city Yin — today’s Yinxu historical site is what remains of it.

The World Heritage Convention says the Yin ruins are a record of “the golden age of early Chinese culture, crafts and sciences, a time of great prosperity of the Chinese Bronze Age.” They include palaces, royal tombs, shrines and numerous artifacts.

yinxu-chariot-skeleton In the ruins of the ancient Chinese city of Yin, once a capital of the Shang Dynasty, archaeologists have uncovered numerous structures, artifacts and skeletons, including this pit of chariots of horse bones. Photo: Reuters

The researchers, who studied the human sacrifices, said ritual killings of both people and animals was not uncommon during this period of Chinese history. But their analysis speaks to the origin of the human victims and their social roles.

“Although oracle bone inscriptions from the site of Yinxu mentioned that many of these victims were war captives, little archaeological evidence could support or confirm this assertion,” the study said. But their change to the local diet only a few years before their deaths and the fact that their diets were “more restricted” while they were at Yinxu suggests the inscriptions were true, that these people were prisoners of war kept as slaves.

report on the research said the victims were buried in the city’s royal cemetery as well as other places, which supports the idea that they were considered members of different classes. Experts previously have demonstrated the victims were either “rensheng,” who were mutilated and buried in mass graves, or “renxun,” who were buried individually — a sort of upper class of human sacrifices. All but one of the skeletons analyzed in this study were rensheng.

Read: Scientists Use Bones to Recreate Ancient Woman’s Face

“The victims were kept as a store of sorts, allowing the king to call for sacrificial rituals even during times of peace,” the report said.

Ancient Chinese nations were not the only ones to practice ritual killings. The Aztecs in Mexico sacrificed thousands of people to the sun, and archaeologists recently found the bones of two human sacrifices beneath an ancient South Korean palace, likely killed to guarantee the construction’s success for the kingdom. There also have been cases of servants being buried alive with dead kings to attend to them in the afterlife.

This study says the information about the human sacrifices’ origins speaks to life and rule during this important period in Chinese history: “This discovery has significant implications for understanding the various tactics used by the Shang kings to consolidate power over their subjects, including the display of violence through mass sacrificial rituals.”