It was so nearly known as dinner. Instead, a small and not terribly impressive chameleon has become the newest discovery of the natural world, after a startled Tanzanian snake spat a still-undigested specimen at the feet of a British scientist, who identified it as a previously unknown species.

Dr Andrew Marshall, a conservationist from York University, was surveying monkeys in the Magombera forest in Tanzania, when he stumbled across a twig snake which, frightened, coughed up the chameleon and fled. Though a colleague persuaded him not to touch it because of the risk from venom, Marshall suspected it might be a new species, and took a photograph to send to colleagues, who confirmed his suspicions.

Kinyongia magomberae, literally "the chameleon from Magombera", is the result, though Marshall told the Guardian today the fact it wasn't easy to identify is precisely what made it unique.

"The thing is, colour isn't the best thing for telling chameleons apart, since they can change colour for camouflage. They are usually identified based on the patterning and shape of the head, and the arrangement of scales. In this case it's the bulge of scales on its nose."

Happily for Marshall, shortly afterwards he spotted a second chameleon, this time alive, and was able to photograph it. The two creatures were found about six miles apart, which he believes may be the full extent of the area colonised by the extremely rare species. Though he found the specimen in 2005, his paper on the discovery, published this week, puts the find formally on record. "It takes quite a long time to convince the authorities that you have a new species," he said.

Had Marshall hoped it might be named after him? "Oh crumbs, no. The thing is, if you work in an area of conservation importance and you can give a species the name of that area it can really highlight that area. By giving it the name Magombera it raises the importance of the forest." The tiny area of jungle is currently unprotected, he said, and he hopes the find will persuade the Tanzanian authorities to extend protection.

"When we presented our findings to the local village people they were just amazed that the world now knows an animal by the Swahili name Magombera," he said.