For decades, researchers thought birds lacked a sense of smell. The line of thinking was that scent gets dispersed in the wind, so it’s not the most accurate tool to locate prey or keep tabs on a predator. Instead, other senses, like sight or hearing, became more fine-tuned because smell just wasn’t as necessary. Recently, however, new research has overturned this idea.

Now, a new study suggests that not only can birds smell, they identify each other using the unique scent of the microbiome found in their preen glands located at the base of their tail feathers.

One way birds stay clean is by spreading around oil produced by the preen, or uropygial, gland. It’s thought that the oil is primarily used to preserve feathers, but previous studies of bird olfaction have also shown that some species communicate using the oil. Researchers have shown that some birds show a preference for certain oily smells, with some songbirds ditching the father of their chicks if a better smelling stud comes along.

For a new paper published in the Journal of Experimental Biology, researchers led by Danielle Whittaker, an ornithologist at Michigan State University, investigated how these scents are produced. Several years ago, after giving a talk on her research about birds and scent, a colleague who studies how bacteria help hyenas produce their musk asked if Whittaker had ever looked into birds’ microbiomes.

“I had never thought about bacteria at all,” Whittaker tells the New York Times’ Veronique Greenwood. “But all the compounds I was describing were known byproducts of bacterial metabolism.”

That's why she decided to see if bacteria were powering the odors in the songbirds she studies. For the study, the team injected antibiotics directly into the preen glands of dark-eyed juncos, a North American songbird, then analyzed how that changed the bacterial communities in the preen oil and subsequently, the odor. They also began culturing the bacteria found in the preen oil of other juncos.

They found that all of the bacteria in the birds’ microbiome produce certain scent notes. When combined, the bacteria produce the birds’ personal scent, which in turn has an impact on their mating success.

“The odors produced by birds are unique to them and allow other birds to gain crucial information regarding the mating process,” Whittaker says in a statement. “Alter that bacteria and the bird could be less attractive to potential mates.”

Greenwood reports that it’s not clear whether the bacteria are solely responsible for the scent or if the birds themselves produce other odor molecules as well.

Next, the team would like to find out exactly what type of information the microbiome, and therefore the odor, is relaying to other birds.

“Bacteria can change for a number of reasons, including from the environment, infections, hormones or social interactions,” Whittaker says. “This is the same for humans. Our personal smells are impacted by our microbiomes. Take antimicrobial products for instance. They seem like a great idea for staying clean, until you realize they can negatively change your microbiome. The same thing goes for birds and other animals.”

The next step for Whittaker is to see just how much the bacteria in the preen gland impacts the juncos’ love lives. Over the past few decades, researchers have found that juncos living in urban areas no longer breed with juncos from the woodlands. She hopes to investigate whether changes in each population’s microbiome are causing them to become reproductively isolated from one another. It’s possible that city birds and country birds literally do not like the smell of one another.

In fact, another recent study released in August showed that black-capped chickadees and Carolina chickadees—two similar-looking species whose habitats overlap in a thin zone through the middle of the eastern United States—use scent to keep track of which species is which. The researchers found chemical differences between the preen oils in the two species, though they did not look at the microbiome. The birds showed a preference for birds of the same scent, which keeps the two populations from interbreeding.

However, the two chickadee species do sometimes mate and hybridize along the zone, meaning scent isn’t the only cue that leads to reproduction.