The compact, gnarled and knobbly specimen looks like a root of ginger. In fact, it’s 17,000-year-old puma poo, and it contains the oldest parasite DNA yet recorded.

The team of researchers behind the discovery say the finding not only confirms that the felines were prowling around the Andes towards the end of the last ice age, but reveals that they were infested with roundworm long before humans and their animals turned up.

“The common interpretation that the presence of [this roundworm parasite] in modern American wild carnivores is a consequence of their contact with domestic dogs or cats should no longer be assumed as the only possible explanation,” the scientists write.

The coprolite was discovered in a sedimentary layer within a rock shelter 3,582m above sea level in Argentina’s Catamarca province. Photograph: Cambridge University Press

The study, published in the journal Parasitology, reveals how the ancient faeces, or coprolite, was discovered in a sedimentary layer within a rock shelter 3,582m above sea level in Argentina’s Catamarca province.

The rock shelter had also been home to a number of other creatures. “Puma, ancient horses, camelids and giant sloths lived together during the Pleistocene,” Dr Romina Petrigh, from Argentina’s National Council of Scientific and Technical Research and first author of the research, told the Guardian.

The faeces was radiocarbon-dated to between 16,570 and 17,000 years ago – towards the end of the last ice age. Importantly, the team noted, the coprolite was produced long before humans arrived in the area about 11,000 years ago.

After rehydrating and sieving the coprolite the researchers managed to pick out parasite eggs and, from these, isolated ancient DNA. Since DNA becomes damaged and breaks down over time, the team focused on DNA from the tiny “powerhouses” inside cells, called mitochondria. This DNA is shorter and more abundant than nuclear DNA which makes up chromosomes.

The team reported that the size and shape of the eggs suggested they came from a parasite called Toxascaris leonina – a type of roundworm which still infests animals today – with the identification backed up by the DNA analysis.

Judging by the rounded ends of the faeces and its maximum diameter of just over 2.5cm, the team deduced the afflicted animal was probably a large member of the cat or dog family. Further ancient DNA analysis, this time looking at mitochondrial DNA found in the faeces, revealed that the animal was a puma – a large wild cat still found in the region.

The researchers added that the cool temperatures inside the rock shelter, high salt concentrations and rapid drying of the poo might have helped to preserve the DNA within it. Petrigh noted that the latest study sets a new maximum age for the recovery of ancient DNA from coprolites.

Dr Piers Mitchell, the director of the ancient parasites laboratory at the University of Cambridge, said the age and preservation of the faeces were remarkable.

“The research shows that if the coprolite is preserved in the right environment, we can detect eggs and DNA from parasites many thousands of

years old,” he added. “This will make it easier to plot how different types of

parasites are evolving over time.”