Imagine dinosaur terrain — full of ferns and palms, right? Better add some grass to that picture.

A new discovery debunks the theory that grasses didn't emerge until long after the dinosaurs died off.

Fossilized dung tells the story: The most prominent plant-eating dinosaurs were digesting different varieties of grass between 65 million and 71 million years ago, researchers report Friday in the journal Science.

The earliest grass fossils ever found were about 55 million years old — from the post-dinosaur era.

It's a big surprise for scientists, who had never really looked for evidence of grass in dino diets before. After all, grass fossils aside, those sauropods — the behemoths with the long necks and tails and small heads — didn't have the special kind of teeth needed to grind up abrasive blades.

"Most people would not have fathomed that they would eat grasses," noted lead researcher Caroline Stromberg of the Swedish Museum of Natural History.

Stromberg and a team of paleobotanists from India analyzed sauropod dung — the scientific term is coprolites — found in central India.

The coprolites contained microscopic particles of silica called phytoliths, which form inside plant cells in distinctive patterns that essentially act as a signature.

Amid the expected plants were numerous phytoliths certain to have come from the grass family, report Stromberg and Vandana Prasad of India's Birbal Sahni Institute of Palaeobotany. They included relatives of rice and bamboo and forage-type grasses.

The sauropods didn't eat a lot of grass, the evidence shows.

But grasses must have originated considerably earlier, well over 80 million years ago, for such a wide variety to have evolved and spread to the Indian subcontinent in time to be munched by sauropods, they concluded.

"These remarkable results will force reconsideration of many long-standing assumptions" about dinosaur ecology, wrote Dolores Piperno and Hans-Dieter Sues of the Smithsonian Institution's National Museum of Natural History in an accompanying review.

Beyond the great curiosity about dinosaur life, the discovery has implications about the coevolution of this huge plant family — there are about 10,000 separate grass species — with other plant-eaters, Piperno explained.

Indeed, a mysterious early mammal that roamed among the dinosaurs had more suitable teeth for grazing, raising the possibility of an early adaptation, the researchers note.