Snakes, long thought to be solitary eaters, coordinate their hunts to increase the chances of success, a new study has found.

Researchers from the University of Tennessee (UT) in the U.S. observed the Cuban boa — the island nation’s largest native terrestrial predator — in bat caves for the study.

Many Cuban caves shelter large bat colonies, and in some of them small populations of boas regularly hunt the bats as they fly out at dusk and return at dawn. Researchers noticed that the boas hung down from the ceiling of the cave entrance and grabbed passing bats mid-air.

They found that if more than one boa was present, the snakes coordinated their positions in such a way that they formed a wall across the entrance.

This made it difficult or impossible for the bats to pass without getting within striking distance of at least one boa. The findings were published in Animal Behavior and Cognition .