An Australian scientist has discovered a new species of frog, the “chocolate frog”, in rainforest swamps of New Guinea.

Steve Richards, a frog specialist at the South Australian Museum, first found the spotted the cocoa-coloured creature in 2016 in incredibly challenging habitat.

“That could be why it took so long to find this frog,” he said. “It’s swampy, it’s spiky, there are lots of malaria-carrying mozzies, it floods, there are crocodiles and not many roads. It’s a really unpleasant place to work.”

Despite disturbing an overhanging nest of giant hornets and having “to run flat out” trying to escape them, Richards managed to bag some specimens and after years of painstaking research and genetic analysis he and his colleagues can say for certain that Litoria mira is a new species.

To the untrained eye, Litoria mira looks almost identical to the Australian green tree frog – except for its glossy brown skin. It is the closest relative of the Australian green tree frog.

But genetic analysis shows the Litoria mira has evolved to become genetically distinct to the point where the two species would not be able to breed.

Paul Oliver, from the Queensland Museum and Griffith University, was in charge of the genetic work. One of the first questions he and his team had to answer was whether the chocolate frogs were Australian green tree frogs which can sometimes be brown and are known to live in New Guinea.

An Australian green tree frog
An Australian green tree frog Photograph: David Gray/Reuters

There were some other physical differences, including subtle patches of lavender behind the chocolate frog‘s eyes, and it is a little smaller than the Australian green tree frog, at between 7cm and 8cm when fully mature.

“We named the new frog Litoria mira because the word ‘mira’ means surprised or strange in Latin,” Oliver said.

“It was a surprising discovery to find an overlooked relative of Australia’s well-known and common green tree frog living in the lowland rainforests of New Guinea.”

Richards has discovered a few frog species before in Australia and about 200 in New Guinea.

He said it was sometimes obvious when something was new, but in the case of the chocolate frog, it was a long wait for the science to stack up.

He does not think there was much chance that chocolate frogs could be in Australia because it lacks the “nasty” lowland swampy rainforests of New Guinea.

A research paper co-written by Richards and Oliver has been published in the Australian Journal of Zoology.