Scientists have unearthed the fossil of a pregnant reptile from the time of the dinosaurs. It’s a wild find, because the embryo found inside the 240-million-year-old fossil was not inside an egg, according to a study published today in Nature Communications. That means that, unlike most reptiles and all birds today, this ancient marine reptile didn’t lay eggs but evolved to give birth to live young, just like we do.

Called Dinocephalosaurus, the reptile was a relative of dinosaurs, and a distant ancestor of modern-day crocodiles and birds. These predatory animals lived in the water and grew to at least 13 feet long, with their necks making up nearly half of that length. (Scientists think that the reptiles contracted, then straightened their snakelike necks to create a vacuum — sucking in water and unsuspecting fish.)

“I was not sure if the embryonic specimen is the last lunch of the mother or its unborn baby.”

This latest Dinocephalosaurus fossil comes from inside a big chunk of limestone in Southwest China first excavated in 2008. Scientists led by Jun Liu, a paleontologist at the Hefei University of Technology in China, chipped away at the stone encasing the skeleton. And they realized there was something unusual inside the adult: a tiny, fossilized embryo. “I became very excited,” Liu told The Verge in an email. “I was not sure if the embryonic specimen is the last lunch of the mother or its unborn baby.”

Because no soft tissue was preserved in the fossil, it was actually hard to tell whether the adult was gestating or digesting the embryo. But Liu and his team think that it was the adult’s unborn progeny for a few reasons.

The tiny skeleton inside the adult reptile was fossilized in the fetal position

For one thing, reptiles like Dinocephalosaurus usually gulped their food down head first, facing backward, Liu says. But the tiny skeleton inside the adult reptile is fossilized in the canonical fetal position — curled up and facing forward. In fact, there’s a partially digested fish inside this reptile, too, and its head was facing the opposite direction. Also, there were no egg shells found inside or around the adult skeleton, meaning that the adult probably didn’t chow down on her own, or someone else’s, eggs.

If the Dinocephalosaurus specimen were really pregnant, that would be an amazing finding, and the first for its kind. Even today, most other reptiles and all birds lay eggs — although some snakes and lizards have evolved to pop out live young.In Dinocephalosaurus’ case, giving birth to babies rather than laying eggs would have had an evolutionary advantage.

The marine reptile’s body, with its long, unwieldy neck, probably made the animal awkward and vulnerable on land. In other words, going ashore to lay its eggs, like turtles do, wouldn’t have worked in its favor. Laying eggs underwater was also not an option, because reptile embryos need to breathe oxygen through the shell. Evolving to give live birth would have been highly adaptive, the authors write. Just, maybe not as pleasant for momma Dinocephalosaurus.