This sculpture by Tyler Keillor of the University of Chicago is a reconstruction of the scene preserved in the 67-million-year-old fossils, with the ancient snake Sanajeh indicus poised to strike at the newly hatched titanosaur. ((Ximena Erickson/Bonnie Miljour))

A decades-long study of fossils found in India in 1987 has revealed how ancient snakes ate newly hatched dinosaurs while still in their nests.

The 67-million-year-old fossils show a 3.5-metre-long snake, Sanajeh indicus, coiled up alongside fossilized dinosaur eggshells and the remains of a baby sauropod.

Dhananjay Mohabey, a dinosaur egg expert from the Geological Survey of India, found the fossils in the state of Gujarat in western India, but snake fossils were originally identified as other hatchling dinosaurs.

Mohabey and paleontologist Jeff Wilson from the University of Michigan recognized the coiling fossils as those of a large snake in 2001.

"I saw the characteristic vertebrae of a snake beside the dinosaur eggshell and larger bones, and I knew it was an extraordinary specimen, even if I couldn't put the whole story together at that point," Wilson said in a statement. "I just knew we needed to examine it further."

The researchers prepared the fossils at the University of Michigan and said they show the snakes coiling itself around a crushed dinosaur egg next to a newly hatched half-metre-long titanosaur.

"We think that the hatchling had just exited its egg, and that activity attracted the snake," Mohabey said.

Snakes of this time period were not able to unhinge their jaws to eat eggs whole as some modern snakes do, so they had to wait until the dinosaurs hatched before they could eat them.

"Living primitive snakes are small animals whose diet is limited by their jaw size, but the evolution of a large body size in Sanajeh would have allowed it to eat a wide range of prey, including dinosaur hatchlings," said snake expert Jason Head of the University of Toronto Mississauga.

The research appeared in the open access journal PloS Biology. In a related article, paleontologist Mike Benton of the University of Bristol says that the behaviour of the snake can be deduced from the fossils.

"It seems most likely, as the authors argue, that this 3.5-metre-long snake was waiting and snatching juveniles as they hatched," he said.