Nearly 242 million years ago, a crocodile-sized reptile swam the seas of Earth. Analysis of fossils of this “bizarre” creature have now led scientists to conclude that it was the earliest known marine reptile that was a vegetarian.

“It’s a very strange animal,” Olivier Rieppel, a paleontologist at the Field Museum of Natural History in Chicago and a co-author of a study published in the journal Science Advances, said in a statement. “It’s got a hammerhead, which is unique, it’s the first time we’ve seen a reptile like this.”

What makes this creature so bizarre is its mouth. When the first fossil evidence was discovered in the Yunnan Province of southwestern China, they believed it had a jaw shaped like a flamingo’s beak. As explained in a March 2014 study, researchers initially thought the reptile’s “highly-specialized” feed adaptation allowed it to feed on bottom-dwelling crustaceans and sea-worms.

Not so, the new study, based on a much better preserved fossil, posits. The reptile actually had a hammerhead-shaped face fitted with peg-like teeth along the edges and bundles of needle-like teeth further inside the mouth.

“The long, straight anterior edges of both upper and lower jaws were lined with batteries of chisel-shaped teeth, whereas the remaining parts of the jaw rami supported densely packed needle-shaped teeth forming a mesh,” the authors wrote in the study. “The evidence indicates a novel feeding mechanism wherein the chisel-shaped teeth were used to scrape algae off the substrate, and the plant matter that was loosened was filtered from the water column through the more posteriorly positioned tooth mesh.”

RTX2D5XO A fossil of Atopodentatus unicus is seen alongside a reconstruction showing what it would have looked like in this image released May 6, 2016. Photo: Reuters/Nick Fraser/National Museums Scotland

When the scientists used clay to make a model of the creature’s jaw, it revealed an apparatus so strange that scientists that the reptile lived up to its name — Atopodentatus unicus, which is Latin for “unique strangely toothed.”

“It used the peg-like front teeth to scrape plants off of rocks on the sea floor, and then it opened its mouth and sucked in the bits of plant material. Then, it used its needle-like teeth as a sieve, trapping the plants and letting the water back out, like how whales filter-feed with their baleen,” Rieppel said in the statement.

Not only does Atopodentatus’ fossil provide evidence for the oldest-known marine reptile that fed exclusively on plants, it also helps scientists understand how life evolved and proliferated after the world’s largest mass extinction event — known as “the Great Dying” — killed nearly 90 percent of all marine species.

“Animals living the years surrounding the Permian-Triassic extinction help us see how life on earth reacted to that event,” Rieppel said. “The existence of specialized animals like Atopodentatus unicus shows us that life recovered and diversified more quickly than previously though. And it’s definitely a reptile that no one would have thought to exist.”