It's a classic nightmare. You think you're having a cheeky, sneaky pick-and-flick (or lick, although you probably shouldn't), only to find you've been caught on hidden camera, knuckle-deep up your own nostril.

In this case, though, the nose-picker is an aye-aye (Daubentonia madagascariensis), a primate so adept at discretion that this is the first time we've seen it digging for nasal nuggets and feasting on the fruits of its labor.

Moreover, it uses its preternaturally long middle finger for the task – reaching, scientists believe, so far back that it extends into the animal's pharynx.

This makes the aye-aye one of at least 12 primates known to pick their noses, all of them deft with their hands (some of them even use sticks!).

A comparative study of these animals could help us figure out why the hell booger-eating, or mucophagy, is a thing.

Unlike some primates, the aye-aye has built-in sticks. Its middle finger is unusually long, thin, and hooked, and is an important tool for finding food, as seen in the video below (skip to 2.19).

The animal taps on trees with the finger to find hollows and then uses the same finger to extract insects hiding therein. Crows sometimes use sticks for the same purpose.

So maybe it shouldn't be surprising that the shy, nocturnal creature also uses its useful finger for booger-mining.

The behavior was first spotted at the Duke Lemur Center research facility by biologist Anne-Claire Fabre of the University of Bern in Germany and the Natural History Museum in the UK.

"It was impossible not to notice this aye-aye picking its nose," she says. "This was not just a one-off behavior but something that it was fully engaged in, inserting its extremely long finger a surprisingly long way down its nose and then sampling whatever it dug up by licking its finger clean."

The researchers CT-scanned the head and hand of an aye-aye specimen and used these scans to reconstruct the depth to which the 8-centimeter (3.15-inch) finger reaches when almost fully inserted into the nostril.

These reconstructions showed that the finger can reach all the way down into the aye-aye's throat.

The team's reconstruction of the finger's reach in the aye-aye's nasal cavity. (Fabre et al., J. Zool., 2022)

As for why, well, that's a mystery, and there's no scientific consensus. It's possible that it's purely to help clean mucus out of the nose, but then why eat it, especially if using a tool for the purpose?

One study suggests that the boogers' crunchy texture and salty flavor are satisfying. Others have put forth that eating boogers helps boost the immune system or prevents bacteria from sticking to teeth.

"There is very little evidence about why we, and other animals, pick our nose," Fabre explains.

"Nearly all the papers that you can find were written as jokes. Of the serious studies, there are a few in the field of psychology, but for biology, there's hardly anything. One study shows that picking your nose can spread bacteria such as Staphylococcus, while another shows that people who eat their own snot have fewer dental cavities."

The team's study found that nose-picking is overwhelmingly found in primates with fine motor skills, many of which have been observed using tools for other purposes.

Whether this is significant is unclear; it might simply be that tool-using primates are the most studied, so we've caught them doing it. But it could also be that these animals have the specialized anatomy that allows it.

It's a behavior, the researchers say, that definitely warrants further investigation.

"Future studies should investigate possible roles for this behavior that transcend its characterization as a repugnant habit in humans," they write in their paper.

"Comparative studies reviewing nose picking and mucophagy across additional primate taxa or even in vertebrates, in general, are likely to provide further insight into its origin, function, and evolution and might provide interesting medical perspectives."

The research has been published in the Journal of Zoology.