The earliest known example of a plant-eating reptile has been found, a fossil discovered in 300-million-year-old rocks in southern New Mexico.

The New Mexico Museum of Natural History made the announcement this week, saying the unique structure of the skull, jaws and teeth of the sail-backed reptile indicate it was a herbivore, and that such specialised plant-eating wasn’t previously known in reptiles older than about 200 million years.

The fossil bones were discovered near Alamogordo by Ethan Schuth while on a University of Oklahoma geology class field trip in 2013.

It may look like a dinosaur. But it actually belongs to a much older type of animal known as a pelycosaur — a class more closely related to mammals than dinosaurs. In particular, this one is by far the oldest known vegetarian of its type.

The bones were part of an exquisitely preserved but incomplete skeleton. Field crews spent about a year collecting the bones from the site and more time was spent removing the hard sandstone surrounding the fossils so research could ensue.

Palaeontology curator Spencer Lucas and his team from the museum determined the bones were about 300 million years old, meaning the reptile lived during the early part of the Permian Period, or more than 50 million years before the origin of dinosaurs.

Lucas and research associate Matt Celeskey identified the skeleton as belonging to a new genus and species that they named Gordodon kraineri. Gordodon is derived from the Spanish word gordo, or fat, and the Greek word odon, or tooth, as the species had large pointed teeth at the tips of its jaws.

Gordodon was about 1.5 metres long and weighed an estimated 34 kilograms. It was believed to have been a selective feeder on high-nutrient plants due to the advanced structure of its skull, jaws and teeth.

And this makes it the oldest known vegetarian tetrapod in the fossil record. Previously, the first was thought to have emerged 205 million years ago, in the Triassic period. This discovery pushes vegetarianism back a further 90 million years.

“Gordodon has a large diastema in its jaws between the cropping incisor-like teeth at the front of its mouth and the peg-like teeth at the back,” palaeontologist Matt Celeskey says. “We see this a lot in mammals alive today, like rodents, rabbits, horses [and] goats.”

Gordodon was almost rabbit-like in the shape of its head, with two large chisel-like teeth right at the front of the mouth with tiny teeth further back on the jaws.

Experts at the museum say other early herbivorous reptiles were not selective, chomping on any plants they came across. But they say Gordodon had some of the same specialisations found in modern animals like goats and deer.

It also had large a pointed, thornlike sail structure along its back. Why is not known.

The species name kraineri honours Karl Krainer, an Austrian geologist who contributed to knowledge about the Permian period in New Mexico.

“Gordodon rewrites the books by pushing back our understanding of the evolution of such specialised herbivore by about 100 million years,” Lucas said.