Plant-eating dinosaurs munched on grass, say scientists who had thought the plants emerged after the beasts died off.

The earliest grass fossils are about 55 million years old, but now researchers have found dinosaurs digested grasses between 65 million and 71 million years ago.

The change in thinking is based on an analysis of fossilized dung or "coprolites."

Sauropods were plant eaters with long necks and small heads. Paleontologists thought the dinosaurs used their teeth for cutting trees – like modern beavers – rather than grinding up blades of grass.

Yet small amounts of microscopic silica structures called phytoliths were found in the coprolites from central India, alongside fossilized bones from sauropods called titanosaurs.

Phytoliths form in telltale patterns in grass cells, which photosynthesize differently than most other plants.

The grasses included different species related to rice and bamboo, rather than prairie-type plant life, Caroline Stromberg of the Swedish Museum of Natural History and colleagues said in Friday's issue of the journal Science.

Most of the plant matter in the coprolites were from cycads and conifers known to grow during the time of the dinosaurs.

The plant results may help clear up a mystery for scientists. They couldn't explain why early mammalian teeth suited to grazing have been found with dinosaur fossils.

The new findings may also offer clues to resolve how grasses evolved phytoliths as a mechanical defence against insects and herbivores, said Dolores Piperno and Hans-Dieter Sues of the National Museum of Natural History in Washington in a journal commentary.