Tropical ants that nest in the forest canopy but launch themselves into the air when predators arrive can glide back to their trees using their back legs as rudders, scientists have found.

The arboreal ants, Cephalotes atratus, build elaborate nests in the trunks and branches of tall trees, but are sometimes dislodged by strong winds and tropical downpours, or jump to safety when lizards and birds approach.

Rather than fall directly to the ground, the ants flip their bodies in mid-air and glide backwards, usually to the tree from which they fell, while peering between their legs to see where they are going. Their elongated hind legs are used to adjust their trajectory and latch onto the tree when they land, scientists say.

Researchers used video to study the centimetre-long ants in flight after dropping them from treetops at a field station run by the US Smithsonian Tropical Research Institute on Barro Colorado Island in the Panama canal.

The ants' acrobatic behaviour was confirmed in the laboratory using a high-speed video camera to observe their mid-air manoeuvres.

"For these ants, to fall out of the forest canopy, either into leaf litter or water, would be a really big problem because they'd wind up being eaten," said Stephen Yanoviak at the University of Arkansas at Little Rock, who led the study. "By gliding, they can steer their way back to a tree, climb back up and go home."

If gliding ants become agitated, for example if they are attacked by a predator, they release an alarm pheromone that makes neighbouring ants leap to safety.

To find out how gliding ants steer, Yanoviak collected some of the insects and painted them white with nail polish to make them easier to see. He then climbed up to the forest canopy, plucked a leg or two off each, and compared how well they glided when released.

"If you take the rear legs off the ants, they can still glide back to the tree, but they're not nearly as good at it," Yanoviak said.

In tests, a control group of intact ants landed on a tree trunk more than 90% of the time. When their hindlegs were removed, however, they made it back to the tree roughly 40% of the time. Removing the ants' midlegs reduced their success to less than 70%

"Trying to understand how something as small as an ant is able to control its fall is interesting and relevant to understanding how these behaviours, and insect flight in general, evolved," said Yanoviak, whose study is published in the journal Proceedings of the Royal Society B.