When you enter rainforest near a 'supercolony' of crazy ants on Christmas Island, be prepared for the powerful stench of rotting seafood.

Key points: Millions of Christmas Island's famous red crabs have been wiped out by ants that spray acid into their eyes and joints

Millions of Christmas Island's famous red crabs have been wiped out by ants that spray acid into their eyes and joints A foreign species of wasp has been introduced to feed on the ants' food source

A foreign species of wasp has been introduced to feed on the ants' food source Early signs suggest ant numbers in certain sites on the island have diminished dramatically

Named for their erratic behaviour, the ants themselves do not produce the odour — instead it comes from the millions of crabs they have killed.

Roughly 40 million of Christmas Island's famous red crabs have been wiped out by invasive crazy ants since the early 1990s, according to estimates conducted four years ago.

"It's really heartbreaking," said Tanya Detto from Parks Australia, the organisation responsible for the national park on Christmas Island.

"To walk into an area where there should be hundreds of crabs and just see their little corpses everywhere [is difficult]."

Christmas Island is one of Australia's most remote territories, located in the Indian Ocean about four hours' flight north-west of Perth.

Red crabs are unique to the island and their annual mass migration, which sees hordes march from the rainforest to the sea, has captured the imagination of people around the world.

Tanya Detto from Parks Australia has been instrumental in the biocontrol program since its inception. ( ABC News: Tom Joyner )

It is believed crazy ants were first introduced to the island in the early 20th century by a visiting ship.

But their rapid explosion into destructive supercolonies 30 years ago — for reasons scientists do not fully understand — triggered a decline in red crabs.

Crabs wandering through a supercolony of ants during the migration are quickly overwhelmed by the sheer numbers of the insects.

Their deaths are unpleasant: first the ants spray acid into the crabs' eyes to blind them, and then into their joints to immobilise them.

Authorities feared that without intervention, the crabs would face extinction in the wild, a fate already shared by other island species like the blue-tailed skink.

Enter the wasps

But an ambitious project to save the crabs that began a decade ago has hinged on an unusual helper — a foreign species of wasp.

Led by researchers from La Trobe University and Parks Australia, the project to save the crabs started with the importation of 300 tiny wasps delivered by plane from Malaysia.

The wasps were chosen due to their natural inclination to feed on scale insects, the food source fuelling the rampant crazy ant numbers on Christmas Island.

Crazy ants have wiped out an estimated 40 million red crabs from Christmas Island since the early 1990s. ( Supplied: CSIRO )

Parks staff worked with a team led by Dr Peter Green, a red crab expert from La Trobe University, to smooth over the arrival of the wasp.

Since 2016, staff have bred the wasps to number in the tens of thousands, and slowly introduced them to sites across the island's sprawling national park.

The strategy is known as biocontrol: the introduction of one species to control the spread of another.

Dr Detto, who runs the biocontrol program, said it had undergone rigorous preparation and was subject to strict controls.

"The first thing anybody thought when we said we were going to introduce a biocontrol agent here was, 'What about the cane toad?" Dr Detto said.

"It's an understandable concern [but] there are a lot more checks and balances in place now than there used to be."

Red crabs play a central role in Christmas Island's ecosystem. ( ABC News: Tom Joyner )

For a little over two years, the Parks Australia team has been monitoring crazy ant numbers since introducing the wasps at sites across the island.

Early signs suggest ant numbers in certain sites on the island have since diminished dramatically, but they're careful not to call it a success yet.

On at least one of the sites, recent counts indicated ants in a sample area had reduced from about 700 to just 10.

The reduction in crazy ants has allowed the crabs to dig mating burrows in parts of the undergrowth where a supercolony once thrived.

"We just need to see that in a few more sites before we can say that it was a result of the wasp," Dr Detto said.

A keystone species

Red crabs are a keystone species on Christmas Island, meaning they play a central role in the island's ecosystem.

Without them, life on the island would not be the same, including for its human inhabitants.

During the migration cycle, which typically begins in November, millions of the crabs emerge from the undergrowth of the rainforest that covers most of the island.

After mating in underground burrows, the females make their way down to the island's beaches to dump their eggs into the ocean in a moonlit ritual.

The migration of crabs can be hazardous for drivers. ( ABC News: Tom Joyner )

"Every time the [rainy] season comes, we always had to seal up any door opening to avoid the crabs coming through," said Zainal Abdul Majid, who grew up on the island.

"Sometimes we hear sounds around the corner or underneath the bed so we try to get them out because they will die there and smell [bad]."

A sea of crabs crossing the island's roads during the migration can become a hazard for drivers, with some roads periodically closed.

But some locals recall the arrival of the crabs also heralding a bountiful time to go fishing off the island's pristine Flying Fish Cove.

"There are a lot of fish around the shore area, so [as children] we grabbed our buckets and used them as bait," said Mr Abdul Majid.

Today, the crabs are a protected species and killing or eating them is forbidden, although locals say their taste is bland.

The annual migration of red crabs on Christmas Island is famous. ( Flickr: John Tann )

Without intervention, Dr Detto said crab numbers on the island would have continued their decline with the eventual possibility of extinction.

To that end, the project has high stakes, although Dr Detto is certain that if it does fail, she and her team would find another avenue.

"A lot of species have actually gone extinct on the island already. It would be great if we didn't lose any more," she said.

"It will be a really awesome day to know if it worked, because it's not something we can give up on. We need to find a solution, whatever it might be."