A few years ago, things looked pretty grim for the whistling tree frog (Litoria verreauxii verreauxii) of New South Wales, Australia. The deadly chytrid fungus, Batrachochytrium dendrobatidis (Bd), which has ripped its way through amphibian populations and caused dozens of extinctions over the past four decades, hit the frogs hard, wiping them out in most of their range and leaving behind only a few tiny pocket populations.

They weren’t alone: the chytrid fungus nearly wiped out four other frog species in the region during the 1980s.

But now, a few decades later, the whistling tree frogs are back. According to two new papers published in Biological Conservation, the species has recolonized 39 sites from which they had previously been eradicated and they are breeding prodigiously. Similarly, an extremely rare related subspecies called the alpine tree frog (L. v. alpine) is also doing better than expected, although its range remains highly constricted.

What enabled these two related groups to survive when so many other species have failed? The answer isn’t completely clear for the whistling tree frog. The authors found several infected or dead frogs, but not as many as previous surveys would have indicated. The researchers theorized that either the amphibian has evolved slightly, gaining some semblance of protection, or that individuals who survived the fungus as juveniles ended up with an immunity. The frogs definitely had better habitat than some other species, with plenty of plants and woody debris to protect them from predators as they expanded back into their old territories. It’s also possible that the Bd fungus killed so many frogs to begin with that there just weren’t enough to carry it around and infect more frogs.

As for the alpine tree frog, the Bd fungus continues to take a heavy toll, especially on the older generations. Surveys found that almost no alpine frogs survived much past the age of two. But it turns out you can do a lot of breeding in two years. Even though few alpine tree frogs lived to see their third birthdays, they made it through at least one breeding season and successfully replaced themselves with a new generation. That, the researchers found, was enough to stabilize their population numbers.

The alpine tree frogs also benefitted from their habitat, especially during the tadpole phase. The waters in their forest habitats ranged from 24 to 35 degrees Celsius. The chytrid fungus, meanwhile, grows best at temperatures between 17 to 23 degrees C and can’t survive above 28 degrees C. Temperature, it turns out, was their friend, at least until they reached adulthood and returned to cooler wetlands where the chytrid fungus finally got ahold of them.

What does all of this mean? Ben Scheele, the lead author of the two studies, said in a prepared statement that we can save some frogs from the chytrid fungus if we also save their habitats. As for some other species that don’t have that luxury, he said, “we’ll have to breed them in captivity or transfer them to environments that can help get rid of the fungus.” Still other species may require more intensive efforts in the wild: “We can also deepen ponds and fill them with water, preventing them from drying during droughts and killing tadpoles.”

For now though, we have at least two frogs for which those extra steps no longer appear to be necessary. In the war against the chytrid fungus and extinction, that’s a major victory and it provides a small bit of hope for other amphibian species around the world.

Previously in Extinction Countdown: