A new study has revealed that ancestors of modern snakes had small hind limbs with ankles and toes. The study, published in the journal BMC Evolutionary Biology on Tuesday, is expected to reveal new details about the origin and early history of snakes.

With more than 3,400 living species, snakes are said to be one of the most recognizable groups of living vertebrate animals. However, scientists are still baffled by questions about how, where and when the modern snakes emerged. Researchers tried to solve these mysteries in the new study by analyzing snake genomes, modern snake anatomy and new information from the fossil record.

“We generated the first comprehensive reconstruction of what the ancestral snake was like,” Allison Hsiang, a postdoctoral researcher at Yale University, and the study’s lead author, said in a statement. “We infer that the most recent common ancestor of all snakes was a nocturnal, stealth-hunting predator targeting relatively large prey, and most likely would have lived in forested ecosystems in the Southern Hemisphere.”

As part of the study, the researchers generated a family tree for both living and extinct snakes. They also examined key evolutionary patterns that have played significant role throughout the history of the evolution of snakes.

According to the researchers, ancient snakes were wide-ranging hunters that seized their prey with needle-like hooked teeth and swallowed them. These predators lived about 128.5 million years ago during the middle Early Cretaceous period.

“Our analyses suggest that the most recent common ancestor of all living snakes would have already lost its forelimbs, but would still have had tiny hind limbs, with complete ankles and toes. It would have first evolved on land, instead of in the sea,” Daniel Field, a Ph.D. candidate at Yale University, and the study’s co-author, said in the statement. “Both of those insights resolve longstanding debates on the origin of snakes.”