Cats do weird things: Bite ankles, run laps around your apartment for no apparent reason, and freak out at the sight of their own shadows. But perhaps the oddest of them all is this: They farm bacteria in their butts.

Why do they do this? Cats use their anal glands to produce a stinky pheromone spray made up of many volatile chemicals. And it turns out they probably don't make most of those smelly chemicals themselves; they outsource a lot of the production to microbes that live in those glands, new research reveals.

Chemical communication is common in mammals. It's how a dog announces "This fire hydrant is mine!" and how a skunk screams "Go away!" Domestic cats use a complex chemical language to mark their territory with messages that tell others who they are and whether they're ready to mate. [20 Weird Dog and Cat Behaviors Explained by Science]

In a paper published May 1 on the preprint server biorXiv, researchers analyzed the anal gland secretions of a single, anonymous Bengal cat. The paper has not yet been peer-reviewed.

"We're testing the hypothesis that cats maintain these glands in part as incubators for bacteria that produce smells that are important to the cat for signaling," David Coil, a biologist at the University of California, Davis (UC Davis) and co-author on the paper, told Live Science.

The cat used in this proof-of-concept study was admitted to a veterinarian's office in Oakland. With the owner's consent, a technician massaged the cat's rear, extracted fluid from his anal glands, and shipped the prize 70 miles (113 kilometers) north to the lab.

Once the sample arrived, researchers identified the chemical compounds and bacteria present in the secretions. They also cultured some of the bacteria and identified the compounds the microbes had produced.

The anal sac secretion contained 127 compounds and the bacteria in the culture produced 67. Fifty-two of the microbe's compounds were identified in the anal sac secretion.

"So, it's reasonable to believe the microbes are making the volatile compounds" used in communication, Jonathan Eisen, an evolutionary biologist at UC Davis and co-author on the study, told Live Science.

The partnership makes sense for both parties: the feline host is able to outsource complex biochemical synthesis by offering the microbes a warm, moist, nutrient-rich home. And it's not all that surprising; other mammals also host microbes that can produce the volatile chemicals used in communication.

Having shown this relationship between felines and their microbiome, the researchers can begin larger studies to better understand how microbes interact with their hosts.

"In this study, we looked at one cat at one time in a lot of detail," Coil said.

"What's needed now is a much bigger study looking at all the questions this one raised."

The Bengal cat in Oakland was unavailable for comment.

Originally published on Live Science.