Sixty-six million years ago, nothing seemed more unlikely than the dominance of bipedal apes and flying dinosaurs. Yet here we are.

The Cretaceous was a world of enormous terrestrial dinosaurs, some small mammals, and what we now recognize as the predecessors to modern birds. Some, like Hesperornis, were flightless creatures with a beak full of teeth that lived in the ocean. Others, like Icthyornis, were flying fish-eaters. Most diverse of all were the group of birdlike animals called Enantiornithines, or “opposite birds” (named because some of their bones are organized in the opposite manner as modern birds). They lived all across the globe, in over 80 different taxa, many of them adapted for life in the trees.

Not a single one of those species made it past the Chicxulub asteroid that landed on the Yucatan Peninsula.

The asteroid’s impact created a blast one billion times stronger than the bomb at Hiroshima—but that was only the start of the devastation. What followed were global wildfires, years of nuclear winter and acid rain. Amazingly, around 30 percent of organisms did manage to survive, and those survivors included the ancestors to all modern life we see today.

A new study speculates that the trick might have required being able to live on the ground. The study, published today in Current Biology, looks at evidence for widespread forest disappearance and the emergence of what we know now as modern birds. The researchers postulate that because forests were wiped out globally, birdlike creatures that required those perches for survival were forced into extinction, while the ground-dwellers survived.

“What I like about this paper is that it puts down a chip, a marker,” says David Jablonski, a professor of evolution and paleontology at the University of Chicago who wasn’t involved in the study. “Here’s a hypothesis and now it can be more fully explored.”

For the authors of the new paper, coming up with the hypothesis in the first place involved assembling a team of specialists from across the world of paleontology, including those who study ancient pollen and birds. First, the paleobotanists, who studied rock samples from North Dakota. Nestled inside the dusty fragments are millions of microfossils—preserved remains of pollen spores, leaf litter, wood and other debris.

“Because of their very small size and extreme abundance in sediments (around 100,000 per gram of rock), it is possible to study the composition of the flora and its change through time with very high precision, as you can sample the rock record centimeter by centimeter,” said Antoine Bercovici, a paleobotanist at the Smithsonian Institution and an author on the new paper, by email.

Those microfossils from the boundary between the Cretaceous (the last geologic period of the dinosaurs) and the Paleogene (the period immediately following the asteroid) show a very particular pattern known as the “fern spike.” After millennia of spores from a wide variety of plants, suddenly 70 to 90 percent of the microfossil flora record comes from ferns. That’s because ferns reproduce with spores rather than seeds, which are much smaller and more easily spread through the wind, says Regan Dunn, another author on the paper and a paleobotanist at the Field Museum.

“When there’s a big forest fire or a volcanic eruption today, oftentimes the first things that come back are the ferns,” Dunn says. That spike in fern growth is apparent across the world, and it suggests that the ferns were monopolizing a landscape devoid of trees and other plant life. As far as the scientists can tell, it would’ve been a fairly gloomy world, between the ash-darkened skies and the unseasonable cold. But there was enough plant life left for vertebrates to eke out a living.

“When you destroy the environment, that affects every other living organism. You also see a decline in the insect faunas, and we know that because you can look at fossil leaves and see insect damage on them,” Dunn says. “The plants feed the bugs, and the bugs feed the birds, and the birds feed the mammals, so when you take the base out of that, you have massive repercussions.”

Daniel Field, a paleontologist at the UK’s University of Bath, has long been interested in the question of how a devastating mass extinction that occurred millions of years ago could ultimately produce the breathtaking diversity of bird species we see today. With this study, he and his team begin to piece together the answer. Using statistical analysis of the fossil record, combined with data on the forests, the researchers concluded that non-arboreal birds—those who didn’t live in trees—were much more likely to survive.

That’s not to say a ground-dwelling lifestyle was the only thing required for making it out of the mass extinction. Body size and diet likely had something to do with it, as well as other factors.

After all, there were dinosaurs the size of small birds who didn’t make it out—and researchers aren't yet sure why. “You’ve got to explain an extinction where the big dinosaurs went out, but the crocodiles didn’t. Where the mosasaurus went out, but sea turtles didn’t,” Jablonski says. “The fascinating thing to contemplate is, how do you have [a mass extinction] that removes 60 percent of organisms, but not 100 percent? It’s got to be really severe, but on the other hand, some of them are still standing.”

The next steps to filling in the picture will be figuring out what exactly happened to forests—the researchers currently think it took at least 1,000 years before they began to recover—and how everything else survived in the meantime. Birds diversified rapidly shortly after the extinction event, but scientists still aren’t sure exactly when it happened and how it varied among species.

The importance of piecing together this period of the past is also critical for predicting the future. The researchers say what happened to birds at the end of the Cretaceous could help us understand how human-made climate change might affect today’s birds. “What these kinds of studies show is that ecosystems, although remarkably resilient, really do have breaking points,” Jablonski says. “And that history should be considered extremely sobering.”