Nearly 50,000 years before the invention of penicillin, a young Neanderthal tormented by a dental abscess ate greenery containing a natural antibiotic and pain killer, analysis of his teeth revealed Wednesday.

The male, who lived in El Sidron in what is now Spain, ate an antibiotic fungus called Penicillium and chewed on bits of poplar tree containing salicylic acid - the active ingredient of modern-day aspirin, researchers said.

The youngster's fossilised jawbone reveals the ravages of an abscess, and his dental plaque contained the remnants of an intestinal parasite that causes acute diarrhoea, "so clearly he was quite sick," they wrote in the journal Nature.

The study is the latest to recast our long-extinct cousins, long thought of as thick-skulled and slow-witted, in a more positive light.

Other recent findings have started to paint a picture of Neanderthals as sophisticated beings who made cave art, took care of the elderly, buried their dead and may have been the first jewellers - though they were probably also cannibals.

In 2012, a study in the journal Naturwissenschaften said Neanderthals appeared to have used medicinal herbs such as yarrow and chamomile.

Neanderthals lived in parts of Europe, Central Asia and the Middle East for up to 300,000 years but appear to have vanished some 40,000 years ago.

This coincided more or less with the arrival of homo sapiens out of Africa, where modern humans emerged some 200,000 years ago.