Updated

"How snakes lost their legs has long been a mystery to scientists," Dr. Hongyu Yi says in a press release from the University of Edinburgh. But that mystery may have finally been solved thanks to a 90 million-year-old skull and advanced CT scan technology.

It's been long theorized that the ancestors of modern snakes lost their limbs when they evolved to live in the sea. Researchers at the University of Edinburgh determined that's not quite right when they used a CT scan to create a detailed 3D model of the skull of a Dinilysia patagonica—a close relative of modern snakes—and compared it to those of modern reptiles.

What they found was a unique structure in the inner ear that controls balance and hearing and is shared only by burrowing animals. Modern snakes that live in water don't have it.

Using that information, researchers determined the ancestors of modern snakes actually lost their limbs in order to hunt and live in burrows, per the press release.

"The inner ears of fossils can reveal a remarkable amount of information, and are very useful when the exterior of fossils are too damaged or fragile to examine," Yi says.

The study also confirmed the 6.5-foot-long Dinilysia patagonica as the largest burrowing snake ever. The results were published Friday in Science Advances. The study confirms a Yale study from earlier this year that found snakes evolved on land and not in water, UPI reports.

That study used genomes, fossils, and more to determine the ancestors of modern snakes lost their front legs approximately 128 million years ago, though they still had tiny hind legs.

(Here's how boa constrictors really kill their prey.)

This article originally appeared on Newser: Scientists Finally Know Why Snakes Lost Their Legs

More From Newser