In 2013, two biologists named Jamie Voyles and Corinne L. Richards-Zawacki spent weeks slogging up and down mountainsides in Panama. “We were bug-bitten and beat up,” recalled Dr. Voyles, now an assistant professor at the University of Nevada, Reno.

Near the end of their trek, they came to a stop. In front of them sat the object of their quest: a single gold-and-black frog.

“I can’t tell you what that moment was like,” Dr. Voyles said.

She had feared that variable harlequin frogs had disappeared entirely from Panama. As recently as the early 2000s, they had been easy to find in the country’s high-altitude forests.

“They used to be so abundant that you could barely walk without stepping on them,” Dr. Voyles said.

But in recent years, Dr. Voyles and her colleagues started to encounter sick frogs, and then dead ones. And then they couldn’t find any variable harlequin frogs at all.