Hummingbirds evolved long, slender beaks to sip sweet nectar from flowers. But a new study found that some of the birds’ beaks are also built for another purpose—battle.

In South America, for example, where many hummingbird species compete for resources, the birds tend to have tougher beaks, says Alejandro Rico-Guevara. He’s a biologist at the University of California, Berkeley. Some of the birds’ beaks also have hooked tips and jagged teeth. These adaptations help them protect flower patches from rival males and duel over mates.

“We’ve recorded these males using their beaks as weapons to fight,” says Rico-Guevara. “Like aerial fencing!”