It was approaching 17:00, but Mexico City’s fierce summer heat wasn’t letting up. By the time I arrived at Ayluardo’s, a family-owned restaurant in the Iztapalapa neighbourhood, beads of sweat had formed along my hairline, and I was starving.

I checked the menu – damp and crinkled around the edges – and saw Central Mexico’s usual fare staring back at me: enchiladas drenched in spicy tomato sauce; cheese-stuffed poblano chillies topped with pomegranate seeds; and chargrilled meats served with fresh guacamole and refried beans.

It wasn’t until I turned to the back page in search of my favourite agua fresca (water blended with fruit) that I spotted something unusual. Three platillos ancestrales (ancestral plates) lay hidden among the drinks as if cast out from the main menu: sopes del comal con chapulines (toasted grasshoppers served on a thick, doughy tortilla); conejo (rabbit); and tortitas capeadas de ahuautle en salsa verde. I was familiar with the first two; grasshopper snacks and slow-cooked rabbit can be found across the country, particularly in Central and Southern Mexico. But despite having lived in Mexico for six months at the time, I’d never heard of the last one.

Intrigued, I asked the waiter what “ahuautle” is.

“Insect eggs, señorita,” he replied, explaining that they were mixed into a batter, fried and topped with green salsa. “It’s a very special dish that goes back many, many years. Shall I place the order?”

You may also be interested in:

• A sauce made from flying ants

• Japan’s mysterious moving meal

• The truth about açaí bowls

Laid by water flies from the Corixidae and Notonectidae families (though often referred to as “mosquitos” by locals), ahuautle is a delicacy that pre-dates the arrival of the Spanish in Mexico. Loosely translating to “seeds of joy” from Nahuatl, the ancient Aztec language, these precious quinoa-sized eggs were considered by the Aztecs to be the food of the gods. Believing the eggs would give them strength, Aztec emperors – including, most famously, Montezuma – were said to have eaten ahuautle every morning during the summer rainy season, when the eggs were in abundance and at their freshest.

Mexico City locals will tell you that ahuautle also took centre stage at the human sacrifice ceremonies held in the Aztec capital of Tenochtitlán (which now forms part of modern-day Mexico City) for Xiuhtecuhtli, the Aztec god of fire, every 52 years (an Aztec century). According to 16th-Century Spanish chronicles, after the victims’ hearts had been removed, the empty chest cavity would be coated in the insect eggs as an offering to Xiuhtecuhtli. The gold-coloured eggs were considered so sacred that the sixth Aztec emperor of Tenochtitlán (the father of Montezuma) was named Axayácatl after the type of water fly that lays them.

Axayácatl aren’t the only insects revered by Mexico’s ancient civilisations. According to researcher and insect specialist Julieta Ramos Elorduy B, author of ¿Los insectos se comen? (Can you eat insects?), the Maya referred to grasshoppers as “las divinas flores de dios” (the divine flowers of god), while the Huichol believed wasps carried people’s souls into the afterlife. Among the Teotihuacanos, the Papilio butterfly was a symbol of beauty and youth. It was only when the Spanish conquistadors arrived – repulsed, among other things, at their subjects’ affinity for insects – that Mexico’s love of bugs began to wane.

Perhaps noticing my slight hesitation, the waiter quickly asked: “Would you like to see how they’re prepared?”

Before I could accept, he signalled me to follow him to the kitchen. I shuffled past a sea of lime-green tablecloths and daffodil-yellow chairs, almost every one of which was taken up by the afternoon rush of Mexican families enjoying feasts of grilled meats, vegetable soups and corn tortillas. Inside the cramped, dimly lit kitchen, I was greeted by head chef and restaurant co-owner, Beatriz Ayluardo.

“We don’t get many ahuautle orders these days,” she said, as she showed me a plastic container filled with thousands of sun-dried Axayácatl eggs, each no bigger than a grain of sand. “It’s more expensive than our other dishes, and not many people know about it.”

As I looked on, she mixed the ahuautle with milk, eggs, breadcrumbs, finely chopped onion and coriander to make a runny pancake batter, and then dropped tennis ball-sized portions into a pan of sizzling oil.

“This recipe was passed down to us from my husband’s mother,” Ayluardo explained, as she flipped the insect-egg pancakes at lightning speed. “She was very passionate and knowledgeable about ancestral ingredients like ahuautle. She would make them at home and tell us stories about how they were once eaten by emperors and gods.”

While she prepared a sauce from garlic, tomatillos and serrano chillies to accompany the pancakes, she continued: “When we inherited the family business, we wanted to honour the recipe my mother-in-law had taught us, as well as promote the culinary culture we inherited from [the Aztecs]. But it hasn’t been easy.”

Ahuautle cultivators use the same insect-farming techniques as the Aztecs employed on the banks of Lake Texcoco hundreds of years ago before the lake was largely drained and Mexico City was built in its place. Farmers place hand-woven reed nets just under the water’s surface and secure them with sticks and rope. They leave the nets floating for up to three weeks, during which time the Axayácatl flies will lay thousands of their eggs atop the tightly woven reed bundles. To extract the eggs from the lake, cultivators simply lift the nets from the water and lay them out in the sun to dry. Once all the moisture is gone, a sand-like pile of eggs remains.

Similar to the harvesting of other edible insects such as grasshoppers, ants and mealworms, ahuautle farming requires far less water, land and energy than the rearing of cattle. Yet the tiny eggs fetch a much higher price. According to Ayluardo, a small jar of ahuautle starts at 400 Mexican pesos, or around £16.50, compared to around 100 Mexican pesos (£4) you’d pay for a kilo of beef.

It’s a very special dish that goes back many, many years

Because of its high cost, ahuautle has been dubbed by local restaurateurs like Ayluardo as “the caviar of Mexico”. But, unlike the famous wild sturgeon roe found in the Caspian and Black seas, ahuautle’s steep price tag isn’t due to its popularity. Rather, it’s because ahuautle is extremely hard to get hold of. Due to a drop in cultivators and vendors, ahuautle has become increasingly rare (particularly out of rainy season), and often has to be ordered weeks in advance. Mexico City’s water shortage means the region’s Axayácatl population is declining, and could disappear altogether.

“For the last 20 years, we’ve had a reliable source of ahuautle thanks to a man called Don Manuel Flores, one of the last ahuautle sellers in Mexico City,” Ayluardo said as she plated my pancakes. “He’s in his late 70s and partially blind, but he still made his rounds through Iztapalapa, leaning on his cane, shouting ‘ahuautle!’ every weekend. Like us, he felt passionate about not allowing this ancient caviar to die.”

However, Ayluardo told me it’s been several weeks since Don Manuel had last stopped by the restaurant. “He isn’t well,” she said sadly, “and I’m not sure when, or if, he’ll return.”

With none of Don Manuel’s children or grandchildren interested in taking up the position, his absence is felt heavily at Ayluardo’s restaurant.

“We may be able to find the eggs in the San Juan or La Merced markets during the rainy season,” Ayluardo said, “but it will be even more difficult and expensive to source them. The saddest part is that we may never hear ‘ahuautle’ ring through the streets of Iztalpalapa again, and that’s very worrying for the future of an already forgotten ingredient.”

Ahuautle isn't the only insect dish at risk of disappearing. According to Elorduy B, despite Mexico having one of the largest entomophagous cultures in the world (Mexicans consume 531 of the planet’s 2,111 recorded edible insects), the country is losing its appetite for bugs. In her book, Elorduy B warns that this could threaten a culinary culture that has been practiced here for hundreds – perhaps thousands – of years. Not only that, but a rejection of entomophagy also puts further pressure on water- and land-intensive animal agriculture, which, with a world population set to reach 9.7 billion people by 2050, may not be sustainable forever.

Ayluardo held out the ahuautle pancakes – now lightly browned and bathed in the moss-green sauce – for me to try. I took a bite, first noticing the tangy, spicy hit from the salsa and the slightly gritty texture from the eggs laced through the spongy batter. Then, the distinctive flavour of the ahuautle hit me: a potent, fishy taste similar to that of the tiny dried shrimp popular in East Asian cuisine.

It’s certainly an acquired taste, but with a 63.8% protein content (most lean, cooked beef has just 26-27%) and requiring only a fraction of the resources used to cultivate the flame-grilled steak on the neighbouring table, it was a taste I could get behind.

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.