Neanderthals had a good knowledge about the medicinal properties of plants and used primitive versions of aspirin and penicillin to treat themselves about 40,000 years ago, say scientists who studied the oldest dental plaque from our nearest extinct relative.

The DNA found in the dental plaque of provided remarkable new insights into the behaviour and diet of the Neanderthals, researchers said.

Researchers from University of Adelaide in Australia and University of Liverpool in the UK, unveiled the complexity of Neanderthal behaviour, including dietary differences between different groups and knowledge of medication.

"Dental plaque traps microorganisms that lived in the mouth and pathogens found in the respiratory and gastrointestinal tract, as well as bits of food stuck in the teeth – preserving the DNA for thousands of years," said Laura Weyrich, from University of Adelaide's Australian Centre for Ancient DNA (ACAD).

"Genetic analysis of that DNA 'locked-up' in plaque, represents a unique window into Neanderthal lifestyle, revealing new details of what they ate, what their health was like and how environment impacted their behaviour," she said.

The team analysed and compared dental plaque samples from four Neanderthals found at the cave sites of Spy in Belgium and El Sidron in Spain.

These four samples range from 42,000 to around 50,000 years old and are the oldest dental plaque ever to be genetically analysed.

"We found that the Neanderthals from Spy Cave consumed woolly rhinoceros and European wild sheep, supplemented with wild mushrooms," said Alan Cooper, Director of ACAD.

"Those from El Sidron Cave on the other hand showed no evidence for meat consumption, but appeared instead to have a largely vegetarian diet, comprising pine nuts, moss, mushrooms and tree bark – showing quite different lifestyles between the two groups," said Cooper.

"One of the most surprising finds, however, was in a Neanderthal from El Sidron, who suffered from a dental abscess visible on the jawbone," he said.

"The plaque showed that he also had an intestinal parasite that causes acute diarrhoea, so clearly he was quite sick," he added.

"He was eating poplar, which contains the pain killer salicylic acid (the active ingredient of aspirin), and we could also detect a natural antibiotic mould (Penicillium) not seen in the other specimens," Cooper said.

"Apparently, Neanderthals possessed a good knowledge of medicinal plants and their various anti-inflammatory and pain-relieving properties, and seem to be self-medicating," he said.

"The use of antibiotics would be very surprising, as this is more than 40,000 years before we developed penicillin.

Certainly our findings contrast markedly with the rather simplistic view of our ancient relatives in popular imagination," he added.

The research was published in the journal Nature.