If the asteroid or comet thought to have killed the dinosaurs had come a few million years earlier or later, they might have survived, scientists say.

The space rock that wiped out most of the dinosaurs may have had a colossal case of bad timing. If the impact had occurred a few million years earlier or later, more of the majestic beasts may have survived, scientists say.

A global team of researchers examined the evidence for different extinction scenarios and concluded that an asteroid or comet almost certainly triggered the abrupt annihilation of all dinosaurs, except for birds, some 66 million years ago.

But a period of low diversity among herbivorous dinosaurs, at least in North America, may have set the stage for the massive die-off, according to a study published today (July 28) in the journal Biological Reviews. [Wipe Out: History's Most Mysterious Extinctions]

"The dinosaur extinction is one of the great mysteries in all of science," said study co-author Stephen Brusatte, a paleontologist at the University of Edinburgh in Scotland. "A group of us decided to come together and present a consensus."

Really bad timing

Brusatte and 10 other recognized dinosaur experts from around the world convened and reviewed the latest fossil evidence from North America at the end of the Cretaceous Period, which spanned from 146 million to 66 million years ago. A geological layer known as the K-Pg boundary (formerly known as the K-T boundary) marks the end of this period, and with it, the age of Earth's most charismatic beasts.

Despite some differences, the researchers agreed unequivocally that a meteor impact — from an asteroid, or, some say, a comet — most likely killed the dinosaurs, and that the die-off happened quickly, not gradually, as some researchers believe.

"The extinction was abrupt," happening within a few tens of thousands to hundreds of thousands of years, or even quicker, Brusatte told Live Science. "Dinosaurs weren’t wasting away for tens of millions of years." [Crash! 10 Biggest Impact Craters on Earth]

Volcanic eruptions, fluctuating temperatures and changes in sea level were sculpting the planet a few million years before the giant space rock pummeled the planet and carved out the 110-mile-wide (180 kilometers) Chicxulub crater in Mexico. A giant sea once bisected North America from the Gulf of Mexico to the Arctic, but a drop in sea levels exposed more land, which means dinosaur species that once thrived separately would have had to compete with one another.

(Image credit: Brusatte et al, Biological Reviews)

So why did most dinosaurs die out, when a few — namely, birds, as well as mammals and other creatures — survived? In fact, many birds did go extinct, so it may have been random, Brusatte said. The truth is, scientists don't know what made most dinosaurs so susceptible to extinction.

However, computer simulations suggest that changes in the climate and landscape reduced the number of different plant-eating dinosaurs in North America, which formed the base of the dino food chain.

When the asteroid or comet hit, it may have come at a really bad time. The impact would have triggered tsunamis, earthquakes, wildfires and temperature fluctuations, and the loss of dinosaurs at the bottom of the food chain would have had a domino effect on the dinosaurs that fed on them.

Could they have survived?

If the meteor had hit a few million years before, when a richer array of herbivorous dinosaurs populated North America, or a few million years later, when the salad-munching giants had recovered some diversity, the space rock may not have triggered a dinopocalypse, the researchers said.

Experiencing the meteor impact was a bit like getting hit by a bus, Brusatte said. Having low herbivore diversity would be like limping across the road with a sprained ankle — you're more likely to get run over, he said.

Still, the researchers only looked at the winnowing of herbivore species in North America, said study co-author Richard Butler, a paleontologist at the University of Birmingham in England.

"The great uncertainty at this stage is whether what we see in the North American fossil record really reflects what was going on in the rest of the world," Butler told Live Science.

At any rate, the findings in North America suggest that ecosystems are deeply interconnected, the researchers said. Perhaps that's a lesson for humanity today, as human activities continue to threaten biodiversity.

"I think dinosaurs are a cautionary tale," Brusatte said. "When you mess with diversity," he said, "you can be even more susceptible to a knockout blow."

Follow Tanya Lewis on Twitter and Google+. Follow us @livescience, Facebook & Google+. Original article on Live Science.