Lucas Bustamante carefully aims his laser pointer at a small branch some 50ft (15m) above the ground. The green spot of light is clearly visible, but I just cannot see the lizard he has spotted: just branches, leaves and moss.

If there is indeed a lizard there, it is incredibly well camouflaged against the forest canopy it calls home. Without a second thought, Bustamante begins scaling the trunk of the tree to take a better look.

Within minutes, Bustamante returns to ground level, holding in his hands the lizard we had traveled all this way to find: a sleepy Ecuadorian horned anole, also known as the "Pinocchio lizard".

The Pinocchio lizard is a zoological mystery. It is not the only horned anole (Brazil also has one) but it is the most famous, perhaps owing to its memorable moniker. Yet despite its fame, nobody knows very much about this unique species. Until a decade ago, nobody even knew it was still alive.

Scientists first formally described the Ecuadorian horned anole in 1956.

Over the next few years, herpetologists rounded up another six specimens, all males. By the end of the decade, everything known about this charismatic reptile came from just those seven lizards.

"And then for almost forty years, no one ever saw one," says zoologist Jonathan Losos of Harvard University. "People were beginning to think that maybe they'd gone extinct."

The species was only found in Ecuador's Pichincha Province, home to the Mindo cloud forest, an area just over 250 square kilometers.

Having faced serious deforestation, it was reasonable to suspect that the species had gone extinct before scientists had even gotten to know it.

But then in 2005, a group of birdwatchers happened to pass through the Mindo area.

Despite its incredible herpetological biodiversity, the region is perhaps best known as prime birdwatching habitat, especially for hummingbirds. Someone in the group noticed a lizard crossing the road, which is odd for a tree-dwelling species. Their guide was savvy enough to know that they had seen something significant.

They are nearly impossible to find during the day when they are active

Once people realized that the Ecuadorian horned anole was not extinct after all, two groups of researchers quickly mounted expeditions to Mindo to properly document them, one from the US and one from Ecuador. If they were lucky, they could find some females too; nobody knew if they had the same elongated snouts as the males.

The US expedition, led by University of New Mexico biologist Steven Poe, published a short paper in 2012 describing the species' anatomy based upon another 20 individuals. This confirmed that the horns could be found only on the males.

But they did not uncover much about the anoles' behaviour. That is mostly because the species is so cryptic.

They are nearly impossible to find during the day when they are active, and only slightly easier to spot at night. Poe's team could figure out something about their sleeping habitats, but nothing about their daily activities, nor what those horns were used for.

Even the locals don't see these lizards

So when Losos set out on his expedition, he decided to find a way around the first problem.

He and his team set out in search of the lizards at night. After finding them and marking their locations, they returned to the same trees just before dawn. The lizards would reliably be sleeping in the same spots.

"We basically waited for the Sun to rise and for the lizards to get active," says Losos. "From observations like that, we quickly realized why nobody had ever seen them."

Not only are they extremely well camouflaged, the lizards move without drawing any unwanted attention to themselves.

I saw one bump into a plastic bag, and its horn just folded right over

Losos showed some of the lizards to local construction workers, none of whom said they had ever seen one before. "Even the locals don't see these lizards," says Losos.

So while the lizards are rare, they are even hard to find in places where they are fairly abundant.

"They are endangered, and [they have] a restricted range of distribution, and they occur high up in the canopy," says herpetologist Alejandro Arteaga, who co-founded ecotourism company Tropical Herping with Bustamante. "But in the areas where they occur, we think they are more common than previously thought."

Armed with a more reliable method for finding the elusive, long-snouted anoles, researchers have finally begun to solve the horn's riddle.

One early hypothesis was that the males might use the horns to do battle, using their faces as if they had swords attached. But Losos soon realized that was impossible.

Females might use the horns to assess the quality of males as potential mates

"I saw one bump into a plastic bag, and its horn just folded right over," he says. "There's no stiffness at all, so they couldn't possibly fight with them, they would just bend."

More recently, Ecuadorian biologist Diego Quirola of the Pontifical Catholic University of Ecuador filmed 11 male-female mating attempts among the Pinocchio lizards, as well as three male-male interactions, as part of his 2015 thesis. He and his colleagues are now preparing the results for submission to a scientific journal.

Quirola discovered, as Losos suspected, that the appendage is not used as a weapon. Nor is it terribly important in male-male interactions.

However, Quirola suspects that females might use the horns to assess the quality of males as potential mates. As in many species, the females prefer males that appear larger. Growing a long horn may be a way for males to make themselves look bigger.

That may be true, but there are other facts about the horn that do not seem to fit.

It turns out that the anoles can wiggle their horns up and down

For example, Quirola's group was the first to document the hatching of a male Pinocchio lizard. They found that the hatchling already had a small horn.

That is unusual: other horned lizards only develop their horns as they grow up. Nobody knows why the Ecuadorian anoles grow theirs so early, but it cannot be for attracting females.

In addition, it turns out that the anoles can wiggle their horns up and down. But it is not clear how.

Lizards do not have muscles at the tips of their snouts. Conceivably the anoles do, but that would mean they are even weirder than we thought.

Alternatively, an anole might move its horn by using hydrostatic pressure to push fluids through the tissue. That would mean the horn worked in a similar way to a much more familiar appendage: the penis.

From a scientific point of view, the lizards' elusive nature is thoroughly inconvenient. But their cryptic behaviour probably keeps them safe. If they were easy to find, they would no doubt wind up in the illegal pet trade.

The appendage is not used as a weapon

"Fortunately most of the lizards are still protected by private reserves," says Arteaga. "The owners of these private lands know that the lizards are sought after, and endangered, so they take care of them."

But while the species is listed as endangered by the International Union for Conservation of Nature, Ecuador has taken no specific actions to protect it.

Luckily, the local community has rallied around it. Locals have begun to recognize that the Pinocchio lizard, and the region's other remarkable biodiversity, is good for them. It drives the ecotourism industry and helps support them financially.

That means there is still hope for the Ecuadorian horned anole.

See Bustamante discuss the Pinocchio lizard in this video:

Jason G. Goldman's travel was partly sponsored by the Septimo Paraiso lodge

Join over five million BBC Earth fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.