Tiny feathers encased in fossilized droppings are helping scientists understand why some birds survived the mass extinction that wiped out the dinosaurs and others did not. Unearthed in Montana, the feathery find belonged to a bird that had once been eaten and excreted by a predatory dinosaur (possibly a Tyrannosaurus rex or a smaller cousin) just before the asteroid impact that triggered the extinction 66 million years ago, according to a new study published in the journal Current Biology. The remains include the best-preserved feather ever extracted from Mesozoic deposits, or rocks from the age of the dinosaurs, and the discovery offers a rare glimpse into a defining moment for many species. “It’s such a beautiful, well-preserved feather, from such an unexpected source, and it’s exciting that it can help us answer this big question in paleontology,” the study’s lead author, Jingmai O’Connor, associate curator of fossil reptiles at the Field Museum in Chicago, said in a news release. However, the impressive specimen likely represents a species that did not survive after the asteroid impact, according to the team behind the new research. Based on an examination of the bones found with the feathers inside the coprolite (the scientific term for fossilized feces), the study’s authors believe the feathers belonged to a small flightless diving bird similar to modern loons, which were part of a now-extinct group known as Hesperornithiformes. Paleontologists established decades ago that birds evolved from dinosaurs. That means the bird species fluttering in backyards today are effectively the only surviving dinosaurs. However, it is puzzling that all of today’s birds descend from a single group of dinosaur-era birds called Neornithes, a close relative of the Hesperornithiformes. The hellish conditions caused by the planet’s collision with the city-sized space rock wiped out all other birds and dinosaurs, O’Connor said. The newly found feathers could contain a clue to the disappearance of the Hesperornithiformes. O’Connor said some of the feathers looked very similar to those present in modern birds today, with a central spine that had a square cross section that would have helped make the feather stiff but light. However, others seemed more primitive in structure (smaller and fuzzier) and would not have been as good an insulator as the body feathers of modern birds, he added. “The primitive body feathers of hesperornithiformes were not a problem for these birds during the greenhouse world of the Mesozoic, but the asteroid impact caused an impact winter and global temperatures fell significantly,” he explained by email. Scientists believe the collision released billions of tons of dust, sulfur and other gases into the atmosphere, blocking the sun and causing a dramatic cooling of Earth’s climate. Plants were unable to carry out photosynthesis, a biological process critical for life, for almost two years afterwards, research suggests. “Now the body’s primitive feathers and its less effective insulation are problematic: more energy is needed to stay warm, but there is less food available to acquire this energy.” He said a similar pattern had been observed in other Cretaceous birds called enantiornithines. Its plumage has been preserved in amber balls, resin from prehistoric trees. O’Connor believes that one of the main reasons the Neornithes branch of the bird family survived the mass extinction is due to differences in their feathers. Other scientists had reasoned that because Neornithes species lived near water, something about this habitat helped protect them from the devastating effects of mass extinction. However, Hesperornithiformes also lived by water and disappeared. To confirm their hypothesis, paleontologists would need to find a Neornithes fossil just before the asteroid impact and examine its plumage to confirm that it does not retain feathers with primitive features, O’Connor said. “It would have to be preserved in amber or in another exceptionally preserved coprolite so that the feathers are preserved in 3D and with enough bone to be certain of the identification,” he noted. “Who knows, maybe someone has already caught a coprolite with these traces inside.” These well-preserved feather specimens don’t turn up often, and even those studied in the new research were not immediately evident. David DeMar Jr., a paleontologist at the University of Washington in Seattle, found the coprolite that preserved them in 2016 while collecting fish fossils in Montana, within the Hell Creek Formation. Since feathers had never been found in Hell Creek, despite a 150-year history of searching for fossils there, O’Connor said DeMar’s first thought was that perhaps the crack in the reddish-brown nodule he found on a rock outcrop contained a plant. But closer inspection revealed it to be a feather. “I picked it up and scanned its surface through my magnifying glass, and that’s when I couldn’t believe what I was seeing, a small fossil feather,” DeMar, a co-author of the study, said in the press release. However, it wasn’t until researchers imaged the fossilized feces on a micro-CT scanner that they realized the specimen contained multiple feathers, leg bones, and even remnants of the bird’s stomach contents. Many of the remains were exceptionally preserved in three dimensions. The fossilized dinosaur droppings also preserved two tiny diamond-shaped scales from a fish known as gar that still exists today. According to the study, the fish would have been too small to satisfy a dinosaur predator and therefore likely constituted the bird’s last meal before it was eaten by T. rex. “If it weren’t for the breakage exposing the feathers, we still wouldn’t know that coprolites can be a source of this type of information,” O’Connor said. “I continue to marvel at the kinds of things we find in the fossil record that were never thought possible,” said Anthony Fiorillo, associate research professor at Southern Methodist University and executive director of the New Mexico Museum of Natural History and Science, who was not involved in the research. Subscribe to CNN’s Wonder Theory science newsletter. Explore the universe with news about fascinating discoveries, scientific breakthroughs and more.