Galápagos Islands finches under siege by a nasty, parasitic fly developed an innovative way to fight back – with a little help from biologists, that is.

The same birds that inspired Charles Darwin’s theory of evolution by natural selection are weaving cotton balls soaked in pesticide into their nests to drive out the blood-sucking larvae of the Philornis downsi fly.

According to a new study, published Monday in the journal Current Biology by University of Utah researchers, the deadly fly was introduced to the Galápagos Islands on ships from mainland Ecuador during the 1990s. While the adult flies are harmless, larvae deposited into finch nests kill baby finches.

"This parasite is not historically found in the Galapagos Islands and, therefore, Darwin's finches have not had enough time to evolve defenses against the parasites," Dale Clayton, a University of Utah biology professor and senior author of a study, told Reuters. "In some years, 100 percent of nestlings die as a direct result of the parasites. It is critical to find a way to control the parasites in order to help the birds.”

Researchers say the parasites have affected almost all of the 14 species of Darwin’s finches, two of which are endangered.  

A new method of killing the flies involves leaving cotton treated with a mild solution of permethrin – the same stuff sold over-the-counter to combat head lice and scabies – near the birds’ nesting sites. The birds tore away pieces of the treated cotton with their beaks and incorporated them into their nests, killing the fly maggots and leaving the birds unharmed.

The finches had essentially “self-fumigated” their homes.

After they collected 26 active finch nests, researchers discovered that half of them contained the treated cotton. Nests that had cotton in them also had half as many deadly maggots present.

“Our method of self-fumigation is a simple and immediate solution that can help Darwin's finches combat this devastating parasite,” Sarah Knutie, a researcher with the University of Utah, said in a statement. “Many animals cannot defend themselves against such parasites. Therefore, the animals need our help in developing effective ways to protect them.”