Scientists have upgraded their opinion of Neanderthal cuisine after spotting traces of cooked food on the fossilised teeth of our long-extinct cousins.

The researchers found remnants of date palms, seeds and legumes – which include peas and beans – on the teeth of three Neanderthals uncovered in caves in Iraq and Belgium.

Among the scraps of food embedded in the plaque on the Neanderthals' teeth were particles of starch from barley and water lilies that showed tell-tale signs of having been cooked.

The Ice Age leftovers are believed to be the first direct evidence that the Neanderthal diet included cooked plants as well as meat obtained by hunting wild animals.

Dolores Piperno, who led the study at the archaeobiology laboratory at the Smithsonian National Museum of Natural History in Washington, said the work showed Neanderthals were more sophisticated diners than many academics gave them credit for.

Piperno said the discoveries even raised the possibility that male and female Neanderthals had different roles in acquiring and preparing food. "The plants we found are all foods associated with early modern human diets, but we now know Neanderthals were exploiting those plants and cooking them, too. When you cook grains it increases their digestibility and nutritional value," she added.

The findings bring fresh evidence to the long debate over why Neanderthals and not our direct ancestors, the early modern humans, went extinct.

The last of the Neanderthals are thought to have died out around 28,000 years ago, but it is unclear what role – if any – modern humans played in their demise.

"The whole question of why Neanderthals went extinct has been controversial for a long time and dietary issues play a significant part in that," Piperno said.

"Some scholars claim the Neanderthals were specialised carnivores hunting large game and weren't able to exploit a diversity of plant foods.

"As far as we know, there has been until now no direct evidence that Neanderthals cooked their foods and very little evidence they were consuming plants routinely."

Piperno's team was given permission to study the remains of three Neanderthal skeletons. One was unearthed at the Shanidar cave in Iraq and lived 46,000 years ago. The other two were recovered from the Cave of Spy in Belgium, and date to around 36,000 years ago.

The scientists examined three teeth from the Iraqi Neanderthal and two from each of the Belgium specimens. To look for traces of food on them, they scraped fossilised plaque from each tooth and looked at it under a microscope.

Grains from plants are tiny, but have distinct shapes that the scientists identified by comparing them with a collection at the Smithsonian's herbarium. The researchers also cooked a range of plants to see how their appearance changed.

They collected 73 starch grains from the Iraqi Neanderthal's teeth. Some of these belonged to barley or a close relative, and appeared to have been boiled in water.

"The evidence for cooking is strong. The starch grains are gelatinised, and that can only come from heat associated with cooking," Piperno said.

Similar tests on the Belgian Neanderthals' teeth revealed traces of cooked starch that probably came from parts of water lilies that store carbohydrates. Other cooked starch grains were traced back to sorghum, a kind of grass.

The study is published in the Proceedings of the National Academy of Sciences journal.

In Piperno's opinion, the research undermines one theory that suggests early modern humans drove the Neanderthals to extinction by having a more sophisticated and robust diet. The work also raises questions about whether Neanderthals organised themselves in a similar way to early hunter-gatherer groups, she said.

"When you start routinely to exploit plants in your diet, you can arrange your settlements according to the season. In two months' time you want to be where the cereals are maturing, and later where the date palms are ready to pick. It sounds simplistic, but this is important in terms of your overall cognitive abilities.

"In early human groups, women typically collected plants and turned them into food while men hunted. To us, and it is just a suggestion, this brings up the possibility that there was some sexual division of labour in the Neanderthals and that is something most people did not think existed."