A new study sheds light regarding the mystery of how snakes lost their legs and became the slithering animal that the world knows today.

According to the researchers who carried out the study, these reptiles lost their limbs and evolved by burrowing underground to hunt, NDTV reported.

For the study, the researchers used CT scans to analyze the skull fossil belonging to a Dinilysia patagonica, a two-meter long reptile that's believed to be the closest ancestor of modern snakes.

Through the scans, the researchers were able to see inside the bony inner ear of the fossil. They focused on this part of the skull because its cavities and canals controlled the animal's balance and hearing, just like in today's snakes.

Based on the scans, they were able to create virtual 3D models of the fossil. They then compared these to fossil's of snakes and reptiles. They then discovered that the 3D models have a distinct similarity to the inner ear of animals that burrow and hunt for prey.

This led the researchers to believe that the early snakes lost their legs as they evolved for burrowing.

"How snakes lost their legs has long been a mystery to scientists, but it seems that this happened when their ancestors became adept at burrowing," lead researcher Dr. Hongyu Yi of University of Edunburgh's School of GeoSciences said in a statement according to Phys.org.

"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," he added.

The latest discovery contradicts the previous notion that snakes evolved and lost their limbs in order to adapt living underwater. As shown in the study conducted by Dr. Yi's team, the structure of the inner ear of the Dinilysia patagonica was not seen in the fossils of snakes that lived in the water or above ground.

Mark Norell of the American Museum of Natural History and co-author of the study noted that the research team's discovery was only made possible with the help of CT scanning technology. Through this concept, he is hoping other studies will be carried out to gain a deeper understanding of the evolution of other animals.

"This discovery would not have been possible a decade ago - CT scanning has revolutionized how we can study ancient animals," he said in a statement. "We hope similar studies can shed light on the evolution of more species, including lizards, crocodiles and turtles."

The study conducted by the researchers was published on November 27 in the journal Science Advances.