HOW the dinosaurs died out after ruling the planet for over 150m years was a mystery that consumed palaeontologists throughout much of the 20th century. These days it is mostly accepted that they were done in by the climatic after-effects of the impact of a giant asteroid, specifically the one that carved a vast crater 180km across near the Yucatan Peninsula in Mexico. Now the focus has shifted from how they died out to where they came from in the first place. In a paper just published in Current Biology, a team led by Max Langer at the University of São Paulo reports the excavation of four fossils that shed some intriguing light on two different aspects of that question.

The fossils, found by Sergio Cabreira at the Lutheran University of Brazil, come from the Santa Maria formation in the south of the country. One of them, at 230m years in age, is one of the oldest dinosaur fossils ever found. Typically, such ancient finds are nothing more than bone fragments, but this specimen, named Buriolestes schultzi, is in remarkably good shape. It is a distant ancestor of the long-necked sauropods such as Diplodocus and Brachiosaurus. Those giant animals, which stood up to 16 metres high and weighed 50 tonnes or more, were vegetarians.

B. schultzi seems to have been both diminutive—about 1.5 metres long—and carnivorous. Its teeth are curved and have serrated edges, traits usually associated with meat-eating. That finding raises as many questions as it answers: palaeontologists must now ponder when and why sauropods made the switch from eating meat to eating plants. Size probably had something to do with it: it is difficult to see how an animal the size of Brachiosaurus could have hunted enough prey to support its enormous bulk. But were B. schultzi’s descendants forced to become herbivorous as they grew? Or did they switch to a vegetable diet first, then take advantage of the opportunities for growth that offered?

The other fossils in the find address a different question. Palaeontologists have long thought that dinosaurs rose to dominance at the dawn of the Jurassic period, 201m years ago, by out-competing and rapidly replacing other land animals that emerged earlier. One such group was the lagerpetids, a group of reptiles with some dinosaurian characteristics that arose about 236m years ago, during the Triassic period.

Yet evidence has been mounting that suggests this argument is wrong. Several dinosaur and lagerpetid bone fragments have been found alongside one another in Triassic rocks, hinting that, instead of outcompeting the lagerpetids, the dinosaurs coexisted alongside them for millions of years. The Brazilian discovery builds on these fragmentary finds to deal the rapid replacement argument a fatal blow, by clearly revealing a lagerpetid living alongside a dinosaur more than 30m years before the start of the Jurassic. The worlds’ museums of natural history will have to update their displays.