One of the smallest dinosaur skulls ever discovered belonged to a creature in the process of turning vegetarian, say scientists.

The 45-millimetre fossil belonged to a baby Heterodontosaurus - an early dinosaur that lived 190 million years ago. But it was not so much its size that intrigued scientists as its teeth.

Experts have been divided over whether Heterodontosaurus ate meat or plants. It has long, fang-like teeth at the front of its jaw and grinding teeth typical of herbivores at the back, suggesting it was equipped for both.

It has been argued that the fangs may have been confined to adult males - such as the tusks of warthogs - and used for fighting over mates or territory.

But this theory has now been overturned by the baby skull, which has fully formed fangs. Their presence at such a young age indicates they had a different purpose, most likely to defend against predators or hunt prey.

The scientists who made the discovery now believe Heterodontosaurus was in the process of evolutionary transition from carnivore to vegetarian.

Laura Porro, a Phd student from the University of Chicago in the US, said: "It's likely that all dinosaurs evolved from carnivorous ancestors.

"Since Heterodontosaurs are among the earliest dinosaurs adapted to eating plants, they may represent a transition phase between meat-eating ancestors and more sophisticated, fully herbivorous descendants."