“I’ve got something for you.”

One of the village’s wasp hunters beckoned me over to a small canopy at the edge of the field. He unwrapped a jagged, brown piece of a wasp’s nest, its beautiful tessellated interior teeming with larvae. I was being offered a rare, local delicacy; a single kilogram of this nest is only available once a year in November and sells for 9,000 yen (£64). I brought a still-wriggling grub to my lips and swiftly ate it alive.

It was light, creamy and perfectly palatable. The hunter and I continued to chat, in between popping grubs into our mouths like sweets.

We were deep in the countryside in Gifu prefecture at the largest wasp festival in Japan: the Kushihara Hebo Matsuri. Hebo is the local word for two species of black wasps, known for being relatively non-aggressive and therefore easy to catch. Every year, on the first Sunday in November, people from around the region bring wasp nests that have been collected from the surrounding forests to be weighed in a competition. Those with the heaviest nests are awarded a trophy, along with an ample serving of pride. Most attendees get a sting or two, and some buy a nest to take home and cook.

Most attendees get a sting or two, and some buy a nest to take home and cook

The festival, however, is merely the ending of a story that begins a few months earlier. In early summer, a hunting party will set off into the hills. Deep in the forest, they attach a white piece of paper to a sliver of fresh fish and wait. Soon, a wasp swoops in, taking the bait along with the white visual marker as it flies off towards its nest. The hunters give chase, scrambling through bushes, across streams and over valleys. Once they finally locate the nest entrance in the ground, they set about the task of digging it out and transferring it to a wooden nest box where they “raise” it into autumn. The hunters feed the hebo a diet of sugar, water and raw meat in a bid to grow a nest teeming with adults and larvae in time for the November festival.

Wasp consumption used to be practiced across Japan. Yet nowadays, the practice has largely died out, and is mainly confined to the dwindling elder generation in Gifu’s Ena District, where the village of Kushihara is located, and Nakatsugawa to its north-east.

According to Kenichi Nonaka, professor of Interdisciplinary Cultural Studies at Rikkyo University in Tokyo who has studied the region for more than 30 years, the origins of this unique culinary tradition are something of a mystery. While some theories suggest that wasps were once a valuable protein source for this inland community, Nonaka disagrees: “100g of hebo are relatively high in protein, but in reality, no-one eats that quantity at a time.”

You may also be interested in:

• How a plant saved a Japanese island

• Japan's most remote onsen

• Japan's secret udon mecca

After surveying other places in Japan where eating black wasps was once common, Nonaka found that the insects were typically only harvested when people came across them by chance and they were eaten merely as a supplementary food source. Essentially, harvesting black wasps was the insect version of blackberry picking. But Nonaka says that what makes Kushihara and the surrounding regions unique is that while individuals in other Japanese regions harvested nests alone, locals here actively searched for wasps as a social activity and subsequently raised them outside their homes. As a result, hebo was often served during local celebrations, which firmly rooted the wasp-hunting practice in the local culture and identity.

Given hebo’s communal significance in Kushihara, it is perhaps no surprise that a big, public festival developed in 1993, as the elderly generation of wasp-hunters dwindled, in order to save the tradition. And while other regions hold smaller wasp competitions, Kushihara was the only one to receive significant media coverage, which helped to cement its reputation.

Yet, the Ena District suffers from many of the problems afflicting Japan nationwide. A declining population and rural-to-urban migration has left the countryside with empty streets and abandoned houses. Kushihara no longer exists as an independent municipality, having been amalgamated into Ena City as the local population decreased (Ena’s population fell roughly 12% between 2000 and 2015 to just 51,073). And in 2010, the festival’s elderly organisers began to talk about bringing the event to a close, until a few younger villagers stepped up to carry the torch.

“As long as one person who loves hebo is still alive, we will have enough motivation to keep the tradition going,” said Daisuke Miyake, 42, a local forest ranger. “Hebo are a way to connect people.”

Six years ago, Miyake and some of the other younger townspeople took over the festival management. While very few of them collect and raise wasps themselves, they share an understanding of how much hebo mean to the older generation.

At 07.30 on the day of the festival, Miyake was already a blur of action, scaling a tree to help hang up a banner. Left to my own devices, I approached the only non-organisers around. Four elderly men had brought camping stools and were patiently waiting in the middle of the green. Even though the festival didn’t start for another hour or so, the men were eager to be first in line to get first pick of the nests on sale.

You eat wasps, right?

Once they had secured their placement slots, we walked over together to the festival stalls, which featured a variety of wasp-related cuisine. I was eyeing chocolate hebo on sticks when one of my new companions produced a pot of deep-fried hornets. Like a few of Kushihara’s other elders, the men hunt Vespa mandarinia japonica (Japanese giant hornets), which are notorious for their aggression level and potent sting. These are not insects you raise at home.

“You eat wasps, right?” he said, the challenge hanging in the air.

“Go on! Pick a big one!” said another.

The group erupted into raucous laughter. I speared a medium-sized specimen on a toothpick and dutifully munched on it. It was lightly crunchy and, admittedly, rather moreish – precisely the sort of snack that would go well with a beer. Sure enough, one of the men was already sitting back on his camping stool with a canned drink and broad grin.

We were soon tucking into a freshly grilled festival favourite, hebo gohei mochi: grilled sticky rice on a stick coated in a thick, sweet sauce made of miso, peanuts and – of course – wasps. It’s a dish that requires you to pound the rice and mash the hebo larvae. It takes hours to prepare, but it’s been served at celebratory occasions for centuries in the region. A long line snaked towards the counter, where a crew were deftly coating the mochi with the sauce and grilling them over the flames in a finely tuned production line.

A team of younger women decked out in matching T-shirts reading “Hebo Girls” were selling hebo gohan, a dish of rice mixed with wasps. The group had stepped up this year after a number of the village’s elderly women retired from festival food preparation. The women had been up since 04:00 to prepare hundreds of portions of rice, and they prepared the hebo gohei mochi the day before, too. “I’ve eaten hebo since I was a child – it was just an ordinary food. But since I started making gohei mochi myself, I want to share this culture with everyone,” said Shoko Miyake, Daisuke’s wife.

In recent years, a growing interest in entomophagy, both within Japan and internationally, has been bringing a wider range of visitors to the festival

In recent years, a growing interest in entomophagy, both within Japan and internationally, has been bringing a wider range of visitors to the festival. This not only represents an opportunity for the economic revitalisation of the area, but also an opportunity for locals to reconnect with their cultural heritage.

Yet, festival aside, there remains concern over whether the younger generations will embrace the tradition of hebo harvesting as their parents or grandparents did. While many are happy to help out at the festival, some volunteers are not too keen to snack on wasps, let alone raise them.

The most pressing question is who will pass on the hunting techniques. Many younger locals have yet to learn, and show little enthusiasm. And as more people leave the area in search of work, and travel greater distances to return, Kushihara’s residents find themselves with little time for wasp-hunting as a hobby.

Aware of this problem, the head of the festival’s executive committee, Fumitaka Ando, is organising a hunting mission next July for a small group of villagers, including the Hebo Girls. He himself only started hunting three years ago. But he says that the festival’s recent popularity has been encouraging. “Young volunteers have increased, and this year we have the Girls. Kushihara has become one team.”

After the festival ended, I found myself at Daisuke and Shoko’s home, sitting around the dinner table with their three daughters. Shoko was at the stove, simmering hebo in a sweet soy sauce to make a topping for some freshly cooked rice. This is something she remembers doing with her own parents as a child.

We continued to casually chat as we worked through the nest, the children’s faces furrowed in concentration. At the end of the day, hebo culture is just as much about family, friends and local identity as it is about eating insects.

Join more than three million BBC Travel 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 "The Essential List". A handpicked selection of stories from BBC Future, Culture, Worklife and Travel, delivered to your inbox every Friday.