RTSDQTT
A fossil of a dinosaur is seen in an undated picture from the U.S. Immigration and Customs Enforcement?s (ICE) released April 5, 2016. Reuters

The animal known as Dinocephalosaurus was related to dinosaurs and modern-day crocodiles and birds, except with one notable difference. The 245 million-year-old marine reptile gave birth to its young instead of laying eggs, according to a study published Tuesday by Nature Communications.

The predatory creatured called the sea its home and was roughly at least 13 feet long. The neck made up most of that length, which the animal likely used to suck in fish, BBC News reported.

The findings are based on a Dinocephalosaurus fossil found inside limestone in Southwest China that was first excavated in 2008. It was not immediately clear if the animal was pregnant or had died while eating an embryo.

“I became very excited,” Jun Liu, a paleontologist at the Hefei University of Technology in China, told The Verge about discovering the fossil. “I was not sure if the embryonic specimen is the last lunch of the mother or its unborn baby.”

But several signs seemed to suggest the Dinocephalosaurus was pregnant. An embryo found positioned inside the rib cage of the adult Dinocephalosaurus was fossilized in the canonical fetal position and no egg shells were found nearby, suggesting the Dinocephalosaurus had just had lunch. It's also the same species as the adult reptile.

While some snakes and lizards do have live births, most reptiles and all birds lay eggs today, suggesting an evolutionary advantage played a role in the shift. It's likely the Dinocephalosaurus was too large to easily get out of the water to lay eggs.

"Some reptiles today, such as crocodiles, determine the sex of their offspring by the temperature inside the nest," the study's co-author Chris Organ, from Montana State University, said in a statement. "We identified that Dinocephalosaurus, a distant ancestor of crocodiles, determined the sex of its babies genetically, like mammals and birds.

This isn't the oldest animal scientists have studied so far. Sponge-like African fossils found in 760-million-year-old rock in Namibia could be the earliest known animals.