The Church on Spilt Blood in St. Petersburg, Russia, is like something out of a fairy tale. Perched on the edge of a frigid canal, it has a forest of onion domes that stretches toward the sky and pastel-colored mosaics that cover every square inch of the interior. This is not the type of place where paleontologists typically hang out, but I was in town to study a new dinosaur, and I insisted on taking a detour. The visit was personal. The church was built on the spot where Czar Alexander II was assassinated by revolutionaries in 1881, setting in motion a sequence of events that led, eventually, to me. The czar's death ushered in a frenzy of anti-Jewish pogroms. Jews on the edge of the Russian empire grew frightened, and a family in Lithuania panicked and sent their young son to safety in America. That man was my great-grandfather. If not for that chain of dominoes that began more than 100 years ago in St. Petersburg, I would not be here today.

All families have stories like this one—weird twists of fate in the distant past, without which the present would be very different. Evolution works this way, too. The history of life is one big contingent tale, liable to be rerouted at any time. Indeed, that is precisely what happened 66 million years ago, at the end of the Cretaceous period. For the preceding 150 million years dinosaurs had dominated the planet, growing to colossal sizes and thriving in nearly every conceivable environment on land. But then something changed, and Tyrannosaurus, Triceratops and their kin vanished.

The extinction of the dinosaurs is one of the greatest mysteries in all of science, and it hooked me on science as a teenager. Over the past decade, as I have collected dinosaur fossils around the world, it has gnawed at the back of my mind: How could such successful creatures just disappear? A popular theory, advanced in the 1980s, holds that an asteroid did them in. But skeptics have wondered whether other forces might have contributed to their demise. As researchers discover new dinosaurs and learn more about this group's evolution, we are getting closer to a conclusive answer.

I recently organized a large international gathering of paleontologists who met to hash out exactly what we know about why the dinosaurs went extinct. We used the most up-to-date inventory of dinosaur diversity to examine evolutionary trends over time, reviewed the latest information on the timing of the extinction and took a long look at the many environmental changes occurring around the time the dinosaurs disappeared. To our surprise, our team of nearly a dozen dinosaur experts—often an argumentative bunch—came to a clear consensus: as popular wisdom has it, the extinction was abrupt, and an asteroid was primarily to blame. But that story is incomplete: the asteroid happened to hit during what was already a horrible time for dinosaurs, when their ecosystems were vulnerable because of previous environmental change. It is a new and unexpected twist on an old tale and one that has surprising relevance to the modern world and our own evolutionary story.

An enduring mystery

Like most teenagers, I did some rash things in high school. Perhaps nothing was more brazen than picking up the phone one day in the spring of 1999 and cold-calling Walter Alvarez, a geologist at the University of California, Berkeley. I was a 15-year-old kid obsessed with dinosaurs; he was the eminent National Academy of Sciences member who nearly 20 years earlier had proposed the idea that a massive asteroid impact killed off the dinosaurs. His hypothesis began with a curious observation. The geologic record preserves a thin band of clay that marks the boundary between the dinosaur-dominated sediments of the Cretaceous period, which spans the time between 145 million and 66 million years ago, and the dinosaur-barren sediments of the Paleogene period, between 66 million and 23 million years ago. Alvarez found that the clay band was saturated with iridium, an element that is rare on Earth but common in extraterrestrial bodies such as comets and asteroids. He first noticed this anomaly in a rocky gorge near the medieval commune of Gubbio in Italy's Umbria region. As chance had it, my family was gearing up for a trip to Italy to celebrate my parents' 20th wedding anniversary. I nagged my parents to take a break from the basilicas and art museums and visit Gubbio for a day to see the geologic feature that spawned Alvarez's famous killer-asteroid scenario. But I needed directions, so I decided to go straight to the source.

That Alvarez not only answered my call but also gave me detailed directions to the very spot in the gorge where he detected the iridium spike still floors me. I did not expect such a scientific giant to be so kind, so generous with his time. His asteroid theory, published in Science in 1980 with his Nobel Prize–winning physicist father, Luis, and two Berkeley colleagues, touched off a decade of frenzied debate. Dinosaurs and mass extinctions were constantly in the news; the impact idea appeared in countless books and television documentaries; and hundreds of scientific papers argued back and forth as to what really killed the dinosaurs, with paleontologists, geologists, chemists, ecologists and astronomers all weighing in on the hottest scientific issue of the day.

By the end of the 1980s it was undeniable that an asteroid or comet crashed into the planet 66 million years ago. The same iridium layer had been found around the world. And other geologic oddities known to stem from extraterrestrial impacts, including blobs of glass called tektites and deformed grains of quartz known as shocked quartz, turned up alongside the iridium. Furthermore, geologists even located a crater dated to the exact moment of the dinosaur extinction—the 180-kilometer-wide Chicxulub Crater in Mexico. Something unexpected and huge, about 10 kilometers across, had arrived from space and triggered a cataclysm of volcanic eruptions, wildfires, tsunamis, acid rain and sunlight-blocking dust, dooming the dinosaurs.

Still, scientists had precious little information on how dinosaurs were changing during the run-up to the impact and exactly how they and their ecosystems responded to this extraordinary environmental disaster. Debate thus continued to rage over whether that asteroid knocked out the dinosaurs suddenly, while they were still in their prime, or whether it delivered a final blow to a moribund group that was gradually wasting away and would have gone extinct anyway. After all, the asteroid did not strike a static planet but one that was experiencing dramatic sea-level fluctuations, temperature shifts and extreme volcanism. Maybe some of these things had factored into the extinction?

Fresh findings

I never made it to Gubbio during that family trip to Italy. Floods closed the main rail line from Rome, and I was devastated. Fate can be cruel (just ask the dinosaurs), but it goes the other way, too. So imagine my surprise when, five years later, I was back in Italy for a college geology field course. We were staying in a small observatory in the Apennine Mountains run by Alessandro Montanari, one of many scientists who made names for themselves in the 1980s studying the end-Cretaceous extinction. On our first-day tour we passed through the library, where a solitary figure was scrutinizing a geologic map under a flickering light. “I want you all to meet my friend and mentor, Walter Alvarez,” Montanari said in his singsong Italian accent. “Some of you may have heard of him.”

A few days later we were in the gorge in Gubbio, the Mediterranean sun beaming down and fast cars whizzing by. Alvarez stood in front of a class of college students, pointing to the exact place where the asteroid theory was conceived. My classmates were ragging on me because after I introduced myself to Alvarez and he remembered our discussion five years earlier, I could not stop smiling. That day is seared into my memory as one of the most important moments of my early career. I knew then that the riddle of the dinosaur extinction had a hold on me.

Somewhat paradoxically, as a graduate student my research focused mostly on the rise of the dinosaurs to dominance and the origin and early evolution of birds (which stemmed from dinosaurs and are thus the only dinosaur group that did not go extinct). But I finally had the chance to contribute to the dinosaur extinction debate in 2012, when I was finishing up graduate school. My colleague Richard Butler of the University of Birmingham in England, who uses statistics to study evolutionary trends, came up with a nifty idea: How about we pool our expertise on different dinosaur groups and different analytical techniques to take a fresh look at how dinosaurs were changing during the 10 million to 15 million years before their extinction?

We decided to examine dinosaur diversity trends using a metric called morphological disparity. Disparity is essentially an anatomical measure of biodiversity—it quantifies the variability in body size, shape and anatomy in a group over time or across ecosystems. Imagine two ecosystems, one with 15 species of small rodent and the other with a bat, a gazelle and an elephant. The first ecosystem may have more species, but the second has a suite of species with much greater diversity of size, shape and behavior. Disparity can often give a fuller picture of the vitality and biodiversity of groups than simple species counts can, and we wanted to see if there were any obvious trends in dinosaurs. Increasing or stable disparity during the latest Cretaceous period would indicate that dinosaurs were doing quite well when the asteroid so rudely interrupted their glory days, whereas declining disparity would suggest they were in trouble regardless of the big rock that fell from the sky.

We found some intriguing results. Most dinosaurs had relatively steady disparity during the 10 million to 15 million years before the impact, including the meat-eating theropods (such as Tyrannosaurus and Velociraptor), the long-necked sauropods, and the small to midsize plant eaters (the dome-headed pachycephalosaurs, for example). But two subgroups were in the midst of a disparity decline when the asteroid came: the horned dinosaurs (Triceratops and kin) and the duck-billed dinosaurs. Both groups were large-bodied plant eaters that consumed enormous amounts of vegetation. If you were around 66 million years ago, you would have readily noticed that these dinosaurs were the most abundant. They were the cows of the Cretaceous, the keystone herbivores in the food web.

Around the same time we published our results, other researchers were examining the dinosaur extinction from other angles. Teams led by Paul Upchurch of University College London and Paul Barrett of London's Natural History Museum undertook a census of dinosaur species diversity over time and found that dinosaurs as a whole were still very diverse at the time the asteroid hit but that the group that included the horned and duck-billed dinosaurs was undergoing a decline in species numbers. Their findings quite clearly jibed with our disparity calculations.

How would a decline of species richness and disparity in big plant-eating dinosaurs have influenced the rest of the group? Insights have come from an innovative computer modeling study led by Jonathan Mitchell, then a Ph.D. student at the University of Chicago. Mitchell and his team built food webs for several Cretaceous dinosaur ecosystems and simulated what would happen if a few species were knocked out. The result was striking: the food webs that existed when the asteroid struck, which had fewer large herbivores because of the diversity decline, collapsed more easily than the more diverse food webs from a few million years before the impact.

Bad timing

With so much new data on the dinosaur extinction appearing in the journals, Butler and I had something of a dangerous idea: perhaps we could recruit a crack team of dinosaur experts willing to sit down, discuss everything we currently knew about the dinosaur extinction and try to come to a consensus on why we thought dinosaurs died out. It was mostly for a bit of fun at first. Paleontologists had been arguing for decades on this topic. Who were we to think we could resolve it? More likely our subversive little plot would end in deadlock or, worse, in a shouting match. In fact, quite the opposite happened. Our group, which included 11 scientists from the U.S., Canada and the U.K., actually came to an agreement. We published our study this past May in Biological Reviews.

Here is what we found when we reviewed all the evidence: Dinosaurs seem to have been doing fairly well in the latest part of the Cretaceous. There are no signs that their overall diversity (in terms of both species numbers and disparity) declined gradually over millions of years. The major groups of dinosaurs all persisted into the very latest Cretaceous, and at least in North America, where the fossil record of latest Cretaceous dinosaurs is most complete, we know that Tyrannosaurus, Triceratops and clan were all there to witness the asteroid impact. This finding rules out the once popular hypothesis that dinosaurs wasted away gradually, probably because of long-term fluctuations in sea level and temperature that altered the amount of land and types of food accessible to them. Instead the dinosaur extinction was abrupt in geologic terms. It stands to reason, then, that the asteroid impact—a sudden and unexpected event—was the culprit.

But, as we had suspected based on our earlier studies, the asteroid was not the whole story. The big plant-eating dinosaurs did undergo a bit of a decline right at the end of the Cretaceous. The exact reason for this downturn is uncertain, but it may have had to do with a shorter-term sea-level drop that greatly changed the land area available for dinosaurs during their final few million years—at least in North America, which preserves by far the best fossil record of this period. As the most abundant herbivores, the horned and duck-billed dinosaurs would be the first dinosaurs to feel the effects of changes in home range and vegetation. Their decline apparently had consequences: it made ecosystems more vulnerable to collapse by destabilizing the foundation of the food web, increasing the likelihood that the extinction of just a few species would cascade through the ecosystem.

All told, it appears that the asteroid impact occurred at a horrible time for dinosaurs. If it had happened a few million years earlier, before the dip in large herbivore diversity, dinosaur ecosystems would have been more robust and better able to endure the impact. If it had struck a few million years later, maybe herbivore diversity would have recovered, as it had countless other times over the preceding 150 million years of dinosaur evolution. It is never a good time for a 10-kilometer-wide asteroid to drop out of the sky, but for dinosaurs, 66 million years ago may have been the worst possible time. With only a modest shift in the chronology, the dinosaurs might still be here today.

What happened 66 million years ago, when that hunk of rock and ice from beyond slammed into Mexico at the most inopportune time for dinosaurs, reverberates today. Mass extinctions are tragic, but they also clear out space for new plants and animals to evolve and become dominant. The death of the dinosaurs brought opportunity for mammals, which had lived in the shadows for more than 100 million years but now had the chance to evolve unencumbered. Mammals blossomed almost immediately after the dinosaurs went extinct, evolving large size and myriad new diets and behaviors, and they spread around the world. This flowering eventually led to the emergence of primates, which led to us. Remove any link in that historical chain reaction, and that probably means no humans.

But there is a greater lesson in the dinosaur extinction. It is not just a mind-twisting tale of evolutionary contingency—another one of those events in the distant past that lets us play the what-if game. Simply put, what happened at the end of the Cretaceous tells us that even the most dominant groups of organisms can go extinct and quite suddenly at that. Dinosaurs had ruled for more 150 million years when their time of reckoning came—a split-second collision between Earth and space. And their extinction was made easier, perhaps even enabled, by losses in biodiversity that preceded the asteroid impact. Modern humans have been around for, at most, a few hundred thousand years, and we are changing the environment at such a fast rate that a so-called sixth extinction is occurring, with global biodiversity in rapid decline. Who knows how vulnerable we are making ourselves in the process?