Dinosaurs are often thought of as giant creatures, but new research adds to evidence they started out small.
The evidence comes from a newly described fossil relative found on Madagascar that lived some 237 million years ago and stood just 10cm tall.
The specimen may also help clarify the currently murky origins of pterosaurs, the winged reptiles that ruled the skies at the time of the dinosaurs.
"There's a general perception of dinosaurs as being giants," said co-author Christian Kammerer, from the North Carolina Museum of Natural Sciences.
"But this new animal is very close to the divergence of dinosaurs and pterosaurs, and it's shockingly small."
The specimen, named Kongonaphon kely, or "tiny bug slayer", was found in 1998 in Madagascar by a team of palaeontologists, led by John Flynn from the American Museum of Natural History in New York.
Dinosaurs and pterosaurs both belong to the group Ornithodira. Their origins, however, are poorly known, as few specimens from near the root of this lineage have been found.
Kongonaphon is not the first small fossil animal known near the root of the ornithodiran family tree but, previously, such specimens were considered isolated exceptions.
In general, scientists thought body size remained similar among the first archosaurs - the larger reptile group that includes birds, crocodilians, non-avian dinosaurs, and pterosaurs - and the earliest ornithodirans.
They are then thought to have increased to gigantic proportions in the dinosaur lineage.
"Analysing changes in body size throughout archosaur evolution, we found compelling evidence that it decreased sharply early in the history of the dinosaur-pterosaur lineage," Dr Kammerer said.
Wear on the teeth of Kongonaphon suggests it ate insects. A shift to this kind of diet, which is associated with small body size, may have helped early ornithodirans survive by occupying a niche different from their mostly meat-eating contemporaneous relatives.
The work also suggests that fuzz over the skin, ranging from simple filaments to feathers, known on both the dinosaur and pterosaur sides of the ornithodiran tree, may have originated for regulating body temperature in this small-bodied ancestor.
That's because heat retention in small bodies is difficult, and the mid-late Triassic Period, when the animal lived, was a time of climatic extremes. Researchers think there were sharp shifts in temperature between hot days and cold nights.