Image copyright Phillip Krzeminski Image caption What the asteroid strike might have been like

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, helps 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," said Dr Daniel Field of the Milner Centre for Evolution at the University of Bath.

We already know that 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.

More stories you might like:

Seed clue to how birds outlived dinosaurs

How birds got their beaks

How birds of a feather evolved together

The plant fossil record shows that the asteroid caused global deforestation and extinction of most flowering plants, destroying the habitats of tree-dwelling animals.

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," said Dr Antoine Bercovici from Smithsonian Institution.

Image copyright Daniel J Field Image caption Tinamous resemble partridges and quail but have limited flight capability

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," said Dr Field.

Today's "amazing living bird diversity can be traced to these ancient survivors", he added.

The research is published in the journal Current Biology.

Follow Helen on Twitter.