Instead of laying eggs, the ancestor of lizards and snakes may have given birth to live young. That could mean that, over the course of millions of years, these reptiles have switched back and forth between the two reporduction methods, researchers report in the January Ecology Letters.

Scientists had thought that the ancestor of snakes and lizards was oviparous, and that if a species converted to birthing live young, it would never switch back.

Fossil evidence, however, supports the idea that ancient reptiles had live births. For the new study, researchers looked at the DNA-based evolutionary tree of thousands of lizards and snakes and were able to trace live birth back to species living up to 175 million years ago.