Barn owls are skilled nocturnal hunters, swooping across open landscapes to scout out small rodents that scurry below. But scientists have long been puzzled by a trait that seems like it would work against the birds during their nighttime prowls. Some barn owls boast a brilliant white plumage—an unusual feature for an animal that should, in theory, need to remain inconspicuous against the darkened sky.

The bellies of Tyto alba, as the common barn owl is formally known, can range in color from dark red to bright white. The reason for this variation in hue hasn’t been clear, but researchers behind a new study in Nature Ecology & Evolution suspected that white barn owls would be especially disadvantaged during the full moon, when light from the hovering celestial body would make them particularly visible to prey.

“As it turns out,” study authors Luis Martín San José García, Alexandre Roulin and Almut Kelber write in the Conversation, “we couldn’t have been more wrong.”

Scientists have been tracking a population of barn owls in Switzerland for more than 20 years, following their hunting behaviors with cameras and GPS trackers, while also taking note of their breeding patterns and the development of their offspring. For the new study, the researchers took this wealth of data and measured it against the lunar cycle, focusing specifically on changes in the moon’s brightness. They found that the reddest barn owls seemed to have a harder time hunting on moonlit nights; the birds brought less food back to their nests, which in turn impacted their reproductive success.

“[T]he survival prospects of nestlings raised by the reddest parents were lower when maximal nestling growth occurred during full-moon nights,” the study authors note. This phenomenon was only observed among the youngest chicks, likely because their small size made them more vulnerable than their older siblings.

But, to the researchers’ surprise, this wasn’t the case for white barn owls, which didn’t seem to be affected by the brightness of the moon. In fact, the whitest owls may have fared better during moonlit nights, “as suggested by the survival of their youngest nestlings raised being positively related to moonlight,” the study authors note.

These results were baffling to the researchers. So they decided to try and get a sense of moon-lit, pearly-white barn owls from the perspective of the birds’ favorite snack: the vole, a small rodent related to hamsters. The team placed voles in a darkened room that was fitted with halogen lights to mimic full and new moon light conditions. Because live owls would be difficult to work with, the team exposed the voles to three taxidermied barn owls—one white and two red—that had been shaped into a flying position. The owls were suspended from a zipline, to make it seem as though they were descending upon their prey.

During the experiment, the research team was watching to see if and when the voles froze, a common prey behavior that, in this case, would indicate that the rodents had seen the owl. The team found that the voles were better able to detect the owls, regardless of color, under full moon conditions. But crucially, when the glow of the “moon” was particularly bright, the voles stayed frozen for five seconds longer if the owl was white.

In the wild, this would give white barn owls extra time to swoop in and snatch their prey, which may explain why they excel at moonlight hunting. The researchers theorize that voles, which probably see owl plumages in varying shades of grey, freeze up in the face of moon-lit white owls because “they’re scared by bright light reflected from the white plumage,” San José García, Roulin and Kelber write in the Conversation. Rodents are in fact known to get spooked by bright lights; medical researchers testing anxiety medications shine light on rodents to trigger their fear response.

“The beautiful thing about this study is that it doesn’t just aim to describe [how the owls’ color affects survival]—it also describes the mechanism behind the process,” Maria Delgado, a behavioral ecologist at Spain’s University of Oviedo in Spain who was not involved in the new research, tells Katherine J. Wu of PBS.

The paper also offers new insight into a little-explored corner of scientific research—namely, how moonlight impacts the evolution of nocturnal species. “Moonlight itself can select for different colorations,” San José García tells James Gorman of the New York Times. “Our study shows very well that it has strong effects on the owls.”

Bright white feathers may confer some disadvantages—like making the birds more visible to such competitors as carrion crows, which have been known to harass barn owls during the day. This could explain why white barn owls continue to have red counterparts. But as San José García, Roulin and Kelber note in the Conversation, the new study emphasizes the importance of protecting the habitats of nocturnal wildlife that seem to exist in a delicate harmony with the night sky.

“Minimising light pollution,” they write, “and letting the night be as dark as the moon dictates could benefit beautiful barn owls.”