Scientists recently came across the oldest fossil of a snake, and it resembles the animal's modern state. But there is one shocking difference-- it has four legs. The discovery can shed light on how lizards possibly evolved into snakes.

The 120-million-year-old snake, called Tetrapodophis amplectus, which was discovered in northeastern Brazil in 2012, was on display at the Museum Solnhofen in Germany when David Martill, a palaeobiologist at the University of Portsmouth, UK noticed that the creature may have had four legs. He borrowed the fossil to study it and determine if what he saw were really legs.

"I was confident it might be a snake," Martill said to Nature.com. "It was only after getting the specimen under the microscope and looking at it in detail that my confidence grew."

Tetrapodophis had four legs which were used for catching prey and mating with partners, thus they coined it as the "four-legged hugging snake." It shows some signs that it is a transitional snake. It doesn't have belly scales that are seen on modern snakes and crocodiles, but it has a short snout, long braincase, long body, fanged teeth and a flexible jaw. There is no indication that it is a marine animal, suggesting that it descended from burrowing terrestrial.

"It had front legs. Nobody had ever seen a snake before with four legs, and yet evolutionary theory predicts that there should be an animal that is transitional between four-legged lizards and snakes, and here it was," Martill said to LiveScience.

There is an ongoing debate on whether snakes evolved from land or marine animals. Researchers believe that this discovery could be the missing link between snakes and lizards.No other reptile carries the combined features of a snake and a lizard.

"The marine hypothesis is dead," senior author Nicholas Longrich of the University of Bath told Discovery News. "It's actually been pretty dead for a while now, but this is really pounding the nails in the coffin. Aquatic snakes evolved from terrestrial snakes -- many, many times."

The study was published in the July 23 issue of the journal Science.