Modern birds owe their survival to ancestors who were able to peck on seeds after the meteor that wiped out most dinosaurs, say scientists.
Bird-like dinosaurs with toothless beaks survived the "nuclear winter" that followed the meteor strike, because of their diet, a study says.
The impact altered the climate of the Earth and blotted out sunlight.
The loss of vegetation would have deprived plant-eating dinosaurs of food. In turn, meat-eaters suffered.
But seeds still in the ground may have sustained small toothless bird ancestors until the planet began to recover.
The theory, outlined in the journal Current Biology, could explain why no modern bird has a beak lined with teeth.
"After this meteor, you're left with essentially a nuclear winter where really not much is growing, the plants aren't able to grow to provide nourishment for plant-eaters and then meat-eaters aren't able to access plant-eaters if they've all perished," said lead researcher Derek Larson, from the University of Toronto.
"We think that the survival of birds had something to do with the presence of their beak."
The researchers studied more than 3,000 fossilised teeth from bird-like dinosaurs known as maniraptorans.
These dinosaurs are some of the closest relatives of modern birds - but, at the end of the Cretaceous period, many disappeared, including the toothed birds.
The team suspected diet might have played a part in the survival of the ancestors of modern birds.
"We came up with a hypothesis that it had something to do with diet," Mr Larson said.
"Looking at the diet of modern birds, we were able to reconstruct a hypothetical ancestral bird and what its likely diet would have been," he told the BBC's Science in Action programme.
"What we're envisaging is a seed-eating bird, so you'd have a relatively short and robust strong beak, which would be able to crush these seeds."
Mr Larson said most of today's birds would not be around if it were not for their seed-eating ancestors, although a handful of other birds might have survived the impact, perhaps through eating insects.
"We might be looking at a very different picture of bird diversity had certain groups not evolved the ability to eat seed material," he said.
The dust in the atmosphere from the strike of the huge comet or asteroid would have obscured sunlight and blocked photosynthesis.
However, seeds that had already built up in the ground would have still been available as a food source for anything with a beak capable of eating them.
Follow Helen on Twitter.