It’s hard out there for a kākāpō. These famously adorable and unusual parrots—chunky, flightless, nocturnal—are one of the many critically endangered species in New Zealand, but efforts to increase their population have been slow-going.

Kākāpōs once had no natural predators, but now must deal with rats, cats, stoats, and possums. The country is trying to eradicate these predators and help the unusual bird come back from its mid-1990s low of just 52 individuals, but encouraging kākāpōs to breed is an uphill battle. The birds mate only every several years, with the fruiting of the rimu, a native tree. On top of that, they’re plagued with defective sperm and high rates of infertility. Now, for the first time in a decade, the country’s Kākāpō Recovery Team announced successful artificial insemination (of three female birds, resulting in two chicks), a major breakthrough in staving off extinction.

Even though scientists have the genomes of every known individual, which helps them match up suitable breeding pairs, kākāpōs just don’t seem like they’re on board with the plan.

“Females are quite choosy. They want the best males with the best genes,” says Nicolas Dussex, a researcher with the Swedish Museum of Natural History.* “So you can’t force them to mate with a less than ideal male.”

It’s reasonable for female kākāpō to want the best, but this means that just a few males dominate the reproductive market—so every generation loses genetic diversity. The genetic similarities among the surviving individuals reduces their fitness, and means that they’re at greater risk of a pathogen wiping them all out in one fell swoop. The answer to this is to manage who mates with whom—giving some of those less desirable males a chance to pass on their genes.

Kuia, one of New Zealand's 142 adult kākāpō, with her clutch.
Kuia, one of New Zealand’s 142 adult kākāpō, with her clutch. Theo Thompson, Department of Conservation (NZ) / CC BY 4.0

“Because the species is at risk of losing genetic diversity, artificial insemination can help maintain the genetic heritage of some males who would otherwise have no chance to mate due to strong competition with other males,” says Dussex.

Artificial insemination also has the effect of increasing the chance that a female kākāpō’s eggs will be fertile. “We use it to improve egg fertility,” writes Andrew Digby, a research scientist with the Kākāpō Recovery Team, in a Twitter post, “since the more times a female mates the more likely her eggs are to be fertile.”

Digby’s team is also working to stave off a recent epidemic of aspergillosis, a lung disease that claimed the lives of seven kākāpō since April and is currently infecting 13 chicks, though some appear to be showing signs of recovery. One of the affected chicks—and one spawned by artificial insemination—is the offspring of 21-year-old Sinbad, who carries the rare genetic material of the Fiordland kākāpō lineage. Sinbad, who had never been a father before this year, is a descendant of Richard Henry, the last Fiordland kākāpō, who was thought to be around 80 years old when he died in 2010.

All of these efforts are supported by Ngāi Tahu, the Maōri people of southern New Zealand, along with the country’s Department of Conservation and Meridian Energy.

“The existing kākāpō population has a very limited stream of whakapapa [a Maōri term for genetic lineage] to produce offspring from,” says Tane Davis, the Ngāi Tahu representative on the Kākāpō Recovery Team, in a release. “The joining of Matauranga [traditional wisdom] and western science perspectives are needed to maintain the kākāpō population, and ultimately enhances the Mauri [life force] of kākāpō.”

Following this breeding season, the grand kākāpō total stands at 142 adults and 72 chicks.

* Correction: This story was updated to reflect that Nicolas Dussex is from the Swedish Museum of Natural History, not the University of Stockholm.