Dinosaurs ruled the earth during the Jurassic period. But first, they had to make it through the end of the world.

Most geologists suspect enormous volcanic eruptions were to blame for the mass extinction event at the end of the preceding Triassic period. This cataclysm spewed huge amounts of gases that geologists suspect altered the global climate and led to the extinction of nearly 80 percent of life on the planet—though the dinosaurs somehow survived and later thrived. Scientists know most extinctions took place among marine life, but how exactly the extinction event affected life on land has been a long-standing geologic puzzle. More recently that puzzle has included the question of whether the tough conditions the dinosaurs survived were a global heat wave or a cold snap. Now new evidence of the existence of icy lakes—found alongside fossilized dinosaur footprints—bolsters the latter idea and suggests that what set up the dinosaurs for survival might have been their ability to brave the cold of a vicious volcanic winter.

There is no direct way to measure the weather the dinosaurs faced just more than 200 million years ago, when enough lava to fill the Grand Canyon 500 times over cascaded across the center of the supercontinent Pangaea. Pouring out of the volcanoes at the same time were vast amounts of carbon dioxide and sulfur, sowing climate chaos. All the carbon dioxide helped kill off ocean dwellers by making the sea too acidic, as evidenced by chemical changes in shells and bones left behind by marine organisms. Geologists have long thought that the greenhouse gas also raised global temperatures, which could have stressed land-dwelling species. The causes of death on land are not as clear in the geologic record as they are for the seas, however, and there may have been other important climate processes at play.

Sulfur from erupting volcanoes can form tiny reflective droplets in the atmosphere that bounce sunlight back into space, cooling the planet and potentially leading to a short-lived “volcanic winter.” Humans have observed this effect firsthand in much more recent events, such as the worldwide spell of cooler conditions that followed the 1991 eruption of Mount Pinatubo in the Philippines. On the more catastrophic end of the spectrum, though, computer simulations suggest a volcano-induced winter at the end of the Triassic could have tanked temperatures by up to 10 degrees Celsius—maybe even overwhelming the heating effect of carbon dioxide.

To determine whether warming or cooling influences won out on land, geologists rely on climate-sensitive processes that can leave clues in rocks. Methods include looking for the fossilized remains of the ancestors of modern cold-intolerant plants, which shift toward or away from the equator as climatic conditions change. But our understanding of ancient plants is limited. Geologists have found the remains of lush, fern-filled forests across most of Pangaea, even near the poles, and there is still debate about whether this points to a warm or cool climate. Luckily there are some more direct fingerprints of cold temperatures, too.

If ice forms along the edge of a lake, rocks and dirt on the shore can freeze into it. When that ice breaks away and floats into deeper water, it melts and drops any sand or pebbles that might have hitched a ride. So when geologists spot shoreline sand or gravel in ancient lake mud, this can point to the work of ice.

In a new study published on Friday in Science Advances, researchers spotted this telltale pattern in ancient lake-bottom rocks from the Junggar Basin, an area in what is now northwestern China that used to be north of the Arctic Circle and part of Pangaea.

This evidence of ice occurs in the very same rock layers where preserved dinosaur footprints abound, suggesting arctic dinosaurs roamed the shores of the ancient lake even through freezing winter conditions. “People have been finding polar dinosaurs for a very long time. What’s different is they have no evidence of [polar regions] freezing,” says study co-author Paul Olsen, a Columbia University geologist and paleontologist. “We were finding dinosaur footprints associated with these seasonally freezing lake deposits.”

Based on evolutionary links between dinosaurs alive in the late Triassic and later dinosaurs, pterosaurs and modern birds with feathers, Olsen and his team argue that the dinosaurs that survived this cold period also had insulating feathers and filaments. (The latter are ancient featherlike structures resembling a single long hair.) This scenario would mean an earlier evolution of dinosaur feathers than has been seen in an unambiguous fossil record. But it falls in line with a theory that there was an early, single evolution of feathers in dinosaurs, which is supported by other paleontologists.

For Olsen, dinosaurs taking advantage of an end-Triassic cold snap to become dominant also helps other patterns in the fossil record fall into place. Long-extinct crocodile relatives called pseudosuchians dominated the toasty tropics of the Late Triassic, and there is no evidence of feathers in their evolutionary family tree. Paleontologists think that, like modern reptiles, pseudosuchians adapted to conserve water—and thus could likely have survived the hot and dry conditions if volcanic carbon dioxide had caused a heat wave. But these reptiles’ skeletons and footprints all but disappear from the fossil record after the end of the Triassic, leading Olsen to posit they could not have kept warm through a volcanic winter. “It really breaks down very simply,” Olsen says. “Everything that was not insulated on land went extinct.”

“It’s a really exciting hypothesis that perhaps this cooling actually caused extinction on land, but I think there’s still a lot more to figure out there,” says Randy Irmis, a paleontologist at the University of Utah, who was not involved with this study but has worked with Olsen in the past. “The hardest problem is disentangling all these climate effects and trying to clarify links between potential kill mechanisms and certain groups of organisms.”

Finding more dinosaurs around Pangaea’s former poles, and more clear signs of low temperatures outside of the Junggar Basin, is key to figuring out exactly what conditions killed the pseudosuchians—and what enabled dinosaurs to survive the end of the Triassic. “What would be nice is to see this kind of evidence in other polar geographical regions,” says Kliti Grice, an organic geochemist at Curtin University in Australia, who was not involved in the new study but has worked with Olsen on other aspects of the end-Triassic extinction. “You’ve got one location; it could be the weather or a seasonal, locational thing. You need to know that it’s more widespread.” But the implications go beyond understanding just this extinction event. “Even if you don’t care one iota about dinosaurs, understanding the six mass extinctions [including the current, ongoing one] that are associated with sudden climate change is supercritical for understanding where we’re going in the future,” Irmis says. “We can only do that by looking at the geologic record.”