New research on the defense mechanisms of small mammals offers insight into why skunks spray their stinky perfume and why other mammals stick together in close-knit groups.

Writing in the journal Evolution, a team of California-based researchers report their analysis of predator-prey interactions among small, carnivorous mammals and birds of prey.

The research was led by University of California, Davis biologist Tim Caro, UC Davis geographer Paul Haverkamp and Theodore Stankowich, a biologist at California State University, Long Beach.

The researchers said that their work breaks new ground in the methodology of estimating predation risks against small mammals.

"The idea is that we're trying to explain why certain anti-predator traits evolved in some species but not others," said Stankowich.

The researchers collected data on 181 species of carnivores, then ran a comparison of very possible predator-prey combination possible, assessing "the potential risk value that estimates the strength of natural selection due to predation from birds and other mammals."

After analyzing the data, the researchers determined that noxious spraying was the preferred defense of of nocturnal and mostly at-risk animals, but animals that are most active during the day are most prone to attack by bids of prey and use sociality as their primary defense mechanism.

"Spraying is a good close-range defense in case you get surprised by a predator, so at night when you can't detect things far away, you might be more likely to stumble upon a predator," Stankowich said.

But small, daytime-active carnivores like meerkats and mongooses tend to stick in close groups and adopt a "more eyes in the sky" defense to keep safe from birds of prey. These social animals also use other tactics to stay safe, including calling out to each other and mobbing together to drive away intruders, the researchers said.