TORONTO – Hundreds of thousands of wood ants that were trapped in an underground bunker survived by eating the corpses of their nestmates, researchers say.

The researchers detail their findings in a paper that was published last week in the .

They say they first discovered the ants in 2013, while checking on bats that were hibernating in the bunker near Templewo, Poland. The bunker, which was used to store nuclear ammunition during the Cold War, had been abandoned after the collapse of the Soviet Union.

How the colony had come to be was no mystery. Another colony had nested on a drainage pipe outside the bunker. An opening there was easily big enough for ants to fall through.

What baffled the researchers, though, was how the colony was able to survive for any significant length of time. Although ant colonies have been found in everything from large mushrooms to the chassis of a car, those habitats all provide easy access to outdoor food sources.

The ants in the bunker, on the other hand, had no obvious place to turn for food. A wooden plank provided a possible clue, but it soon became clear that the plank didn't give the ants anything more than false hope.

"We noticed that a piece of board accidentally leaning against the wall became a starting point of an ant route leading up the wall, ending just under the ceiling where the ants dispersed, not reaching the pipe outlet," the researchers wrote.

Meanwhile, the colony's population was growing fast. Not because of reproductive activity – no queens, eggs or cocoons were ever seen in the bunker – but because worker ants kept falling through the opening from outside.

In late 2016, the researchers built a vertical "boardwalk" up one wall of the bunker to help the ants escape their containment.

They returned a few months later to find that almost all of the nearly one million ants had made it outside – and those that hadn't were all near the base of the boardwalk, seemingly attempting to do the same.

They also examined the two million or so ant corpses left behind. Abdominal holes and other signs of bite injuries were found in 93 per cent of the corpses,

"We can safely deduce that the bunker 'colony' survived on cannibalism, by consuming dead nestmates," the researchers wrote, adding that their observations demonstrate a remarkable ability for wood ants to keep their colonies alive "even under conditions going far beyond the limits of survival of the species."