Scientists have found a 67 million-year-old fossil of a snake coiled around dinosaur eggs and a hatchling. This is the first evidence of snakes eating dinosaurs.

"It's a stunning, once-in-a-lifetime find," said paleontologist Paul Sereno of the University of Chicago, who was not involved in the study. "We've caught one of the rarest moments in the fossil record, which is prey and predator, together."

Geologist Dhanajay Mohabey of the Indian Geological Survey first unearthed the fossil 26 years ago in a rocky, limestone outcropping in the northwestern Indian village of Dholi Dungri. He thought all the bones at the site were those of dinosaur hatchlings.

But in 2001, University of Michigan paleontologist Jeff Wilson, took a second look at the fossils. The team then recognised they had actually found a snake coiled around a broken egg, with a hatchling and two other eggs nearby. The findings appeared 1 March in Public Library of Science Biology.

The newly discovered species of snake, Sanajeh indicus, measures about 3.5 metres (11.5 feet) long. The hatchlings, part of a group called titanosaurs, measured about a foot and a half long (0.45m). Titanosaurs were the largest animal to ever walk on land, with adults that could reach up to 30.5 metres (100 feet) long.

Unlike modern snakes, S. indicus lacked jaw joints that allowed it to open its mouth incredibly wide, so it relied on its large overall body size to prey on the fledgling dinosaurs. Luckily for the snake, the titanosaur hatchlings had soft skeletons that "may have been somewhat collapsible, so you can fold their ribs up a bit and get them in your mouth," Wilson said.

It's likely a slow-rising flood or a storm caused adult titanosaurs to flee, abandoning their nests. The snake then slithered into the nest.

Once the babies start hatching, they begin to "pop their leg or arm out. There will be some kind of activity, and the snake is attracted to that. It will coil itself around the egg," he said. "As soon as it came out of the egg, there's a snake waiting for it."

Unluckily for the snake, that moment was frozen in time because a landslide buried the site right then, Wilson said.

The team has found three or four other spots at Dholi Dungri where snake fossils were uncovered near dinosaur eggs, Wilson said.

The findings may offer insight into the origin of snakes. The reptiles first appear in the fossil record around 98 million years ago, Wilson said. But finding such a complete snake fossil is rare, with only a half-dozen well-preserved specimen from this period. "A lot of their early origins are uncertain. More fossils from an early time help put together a picture of snake evolution," said Wilson.

The fossil find shows some modern animal behavior has very old roots, Sereno said. "Snakes have been at this eating egg-thing for a hundred million years. Before birds fell prey to these things, their ancestors did."