The largest species of its kind in the Southern Hemisphere, the Maori octopus (Macroctopus maorum) is a formidable predator. Weighing up to 12 kilograms (26 pounds) and sprawling some 2 meters (6.5 feet) at full stretch, it haunts the rocky reefs off Australia’s southern coast. Full-grown Maori octopuses, like this individual that photographer Justin Gilligan encountered off Maria Island, Tasmania, hunt by day and night, lunging from lairs to snatch hapless passersby, or tenting patches of kelp and rock under their fleshy webs as they probe with dexterous arms for anything that might be hiding inside. Few reef animals smaller than a Maori octopus are safe when the aggressive cephalopods are nearby, and even some larger animals tend to steer clear. But then, few prey have the good fortune of encountering such a ruthless predator while in the company of thousands of their best mates.

Giant spider crabs (Leptomithrax gaimardii) do, on occasion, assemble in such numbers on the seafloor of Great Southern Reef, a 71,000-square-kilometer (27,413 square-mile) biodiversity hotspot that wraps around much of Australia’s lower half (see related bioGraphic photo essay). While no one knows for certain why the crabs do this or where they’re headed when they assemble, the gatherings seem to coincide with molting, when the crabs are most vulnerable. Like many invertebrates, spider crabs must shed their exoskeletons in order to grow, but this process leaves them unprotected for a short period of time until the new shell has a chance to harden. Scientists suspect that the large aggregations the crabs form might be a classic safety-in-numbers strategy during this critical phase—overwhelming would-be predators with might or an overabundance of choice. No matter how defenseless any one individual in this state might be, sitting tight in a heap of flailing arms and pinching claws is bound to improve one’s odds of survival, particularly when facing a predator that has never seen such a spectacle.

That was almost certainly the case for the Maori octopus that Gilligan photographed off eastern Tasmania. “The crabs just turned up out of nowhere—totally unannounced and totally unexpected,” said Gilligan. “Near Melbourne, this is a regular occurrence,” he explained, “but in Tasmania, it was a complete surprise.” The divers were likely not alone in their astonishment. Given the apparent rarity of such events here, as well as the fact that Maori octopuses live only one year, it’s likely this was a first for the predator as well. As the octopus approached what must have appeared to be a literal banquet on legs, especially for an animal with a penchant for crabmeat, Gilligan could see the cephalopod “changing shape and color, all excited.”

There was just one problem—or rather many. There were thousands of crabs to choose from and double that number of claws to contend with. The banquet soon turned into a battle, with the octopus lunging at nearby individuals, struggling to subdue them, letting go, then trying again. At times, the predator found itself surrounded by the crustaceans, many of which were nearly its size. After 20 minutes or more, the octopus finally managed to overpower one of the smaller crabs and isolate it from the group. It had its meal and a small victory—but the crabs did, too. Considering the carnage that might have been inflicted at the outstretched arms of such a ruthless predator, one in thousands seems like a small price to pay.