There’s a brutal scene at the end of Braveheart where a jacked-up Mel Gibson meets his painful end by getting ripped to literal pieces on the most merciless of medieval torture contraptions, the rack. Barbaric in a way that only the sickest human minds could devise, the rack, which stretched people by their limbs until they were torn apart at the seams, actually has a parallel in nature. Ants, as described in a new article in the Biological Journal of the Linnean Society, seem to use a similarly brutal trap, though they have far more legitimate reasons to use it than medieval humans did.

In the paper, lead author and biotechnology researcher Markus Schmidt, Ph.D., describes the sadistic though effective method that Azteca brevis ants in Costa Rica use to catch their prey. These tree-dwelling ants, like all ants, are pretty small, but they nevertheless manage to capture unsuspecting arthropods nearly 50 times their weight. Part of their success has to do with the fact that ants are generally really good at teamwork, but A. brevis are also uniquely crafty and ferocious. Schmidt and co-author Alain DeJean, Ph.D., paint a thrillingly savage picture of the vicious ants: “They seize the extremities of these arthropods and pull backwards, immobilizing the prey, which is then spreadeagled and later carved up or pulled into a gallery before being carved up.”

Azteca brevis ants
A. brevis ants waiting to ambush their giant prey.

Crucial to the success of these “group ambush” attacks is the location of the traps. The ants set up shop in the branches of plants covered by fungus characterized by holes (“myrmecophytes”) just big enough for a worker ant to poke its head through. The ants hide out in these holes with their mandibles opened wide, like a cursed game of Whack-A-Mole. If the spindly legs of an unlucky passing grasshopper slip into these holes, the jaws will pull them in until the whole insect collapses onto the branch, exposing its entire body to snapping jaws. After that, shit gets medieval.

“Then, the workers holding the extremity of an appendage weave in and out of holes, moving further and further away until the prey is progressively stretched against the gallery before being carved up or pulled into the gallery before being carved up,” the authors write. The whole process can take anywhere from 20 minutes to several hours, but given the amount of fresh meat it yields, it’s more than worth it.

Unlike humans, the ants likely evolved to do this out of necessity. The authors conclude that the corpse-ripping, trap-setting behavior of the ants illustrates the idea of the “extended phenotype” — introduced in 1982 by Richard Dawkins to explain how genes affect more than just an individual’s observable characteristics (“phenotype”) — because if genes dictate behavior as well, then the genome must affect the world outside of that individual. “Given that a trap permits a predator (and its genes) to act on its environment beyond the limits of its physical capacity (i.e. mandibles, beak, mouth, legs), it can be considered an ‘extended phenotype’ of that predator,” the authors write.

By this logic, you could probably argue that medieval age torture devices were part of Homo sapiens’ extended phenotype, but that doesn’t exactly justify the brutality of those “truth extraction” methods. Ants are extremely metal members of the animal kingdom, but at least they have a legitimate reason for being that way.