If it were a children’s mystery story, it might have been called “The Santa Monica Mountains and the Curious Case of the Disappearing Red-Legged Frog.”

Except it wasn’t a children’s story. And it wasn’t a mystery.

Ecologists knew that habitat loss and invasive species were contributing to the decline of what had been one of Southern California’s most common amphibians. And they knew something had to be done to keep it from going extinct.

The efforts of several agencies have boosted the population of red-legged frogs in area mountain streams, according to last year’s State of the Bay report, a scientific assessment of local environmental conditions.

Produced by the Santa Monica Bay National Estuary Program, the five-year report aims to “measure progress in restoring the Bay’s natural habitats and resources” while identifying future problems and educating the public about environmental issues.

“We can bring back a stream corridor that can bring back frogs and birds — and pumas, for that matter,” said Tom Ford, executive director of the Bay Foundation. “Oftentimes environmental issues roll on and on and on, and folks get weary not seeing demonstrable improvements, but we’re able to come back with these results.”

State officials are tracking 128 species in the Santa Monica Bay and its watershed because of their relative rarity, according to the aforementioned report. The El Segundo blue butterfly, the coastal California gnatcatcher and the giant sea bass, among other creatures, have all been monitored by area ecologists as fishing, pollution and habitat changes have challenged their existence.

“We share this landscape with thousands of other species, and the red-legged frogs come to the top of our list,” Ford said. “Those frogs are your first-level predators. Without them, their prey can become too numerous, and their predators have nothing to eat.”

Fearing for the longevity of the red- legged frog, the estuary program in 2010 paid parks officials to find places appropriate for guiding the species back to prominence. By late 2013, two streams had been identified as suitable for reintroducing the frog.

“Habitat fragmentation by development has made it more difficult for the species to repopulate its former range after natural disturbances such as fire and drought,” said Suzanne Goode, senior environmental scientist for the Angeles District of California State Parks. “This effort highlights the role that parks play in the preservation of species and a functioning ecosystem.”

National Park Service officials in 2014 placed protected egg pens in the Simi Hills and later brought them to the two streams, where tadpoles were soon flourishing.

A team led by park service ecologist Katy Delaney has been monitoring the red-legged frogs on twice-weekly visits since February of last year, according to the report. Ford said the effort has also included improving waterways and bringing back native vegetation.

“Establishing multiple populations of California red-legged frogs in the Santa Monica Mountains is key to their long-term survival here,” Delaney said. “Otherwise they run the risk of being wiped out from this area again.”