The ancestors of modern birds may have survived the asteroid strike that wiped out the rest of their kin by living on the forest floor.
The new theory, based on studying fossilised plants and ornithological data, helped explain how birds came to dominate the planet.
The asteroid impact 66 million years ago laid waste to the world's forests.
Ground-dwelling bird ancestors managed to survive, eventually taking to the trees when the flora recovered.
"It seems clear that being a relatively small-bodied bird capable of surviving in a tree-less world would have conferred a major survival advantage in the aftermath of the asteroid strike," Dr Daniel Field, from the Milner Centre for Evolution at the University of Bath, said.
It is already known the early ancestors of modern birds were probably capable of flight, and relatively small in size.
Scientists have now pieced together their ecology to better understand how these partridge-like bird ancestors managed to avoid destruction in a particularly bleak moment in the Earth's history.
"Teasing these stories from the rock record is a challenge when the action took place over 66 million years ago, over a relatively short period of time," said Dr Field, who led a team of UK, US and Swedish researchers.
The plant fossil record shows that the asteroid caused global deforestation and extinction of most flowering plants, destroying the habitats of tree-dwelling animals.
Dr Antoine Bercovici from Smithsonian Institution said birds didn't move back into the trees again until the forests recovered thousands of years later.
"The recovery of canopy-forming trees such as palms and pines happened much later, which coincides with the evolution and explosion of diversity of tree-dwelling birds," Dr Bercovici said.
The researchers found that once the forests had recovered, birds began to adapt to living in trees, acquiring shorter legs than their ground-dwelling ancestors and various specialisations for perching on branches.
They eventually diversified into ostriches and their relatives, chickens and their relatives, and ducks and their relatives.
"Perhaps the best modern analogue for one of the surviving birds lineages are modern tinamous - this is a modern group of flying relatives of ostriches: they are relatively small bodied, and live on the ground," Dr Field said.
Today's "amazing living bird diversity can be traced to these ancient survivors."
The research is published in the journal Current Biology.