The San Juan market is Mexico City's most famous deli of exotic meats, where an adventurous shopper can hunt down hard-to-find critters such as ostrich, wild boar and crocodile. Only the city zoo offers greater species diversity. But the priciest items in the market aren't the armadillo steaks or even the bluefin tuna. That would be the frozen chicatanas – giant winged ants – at around $500 a kilo.

Apparently, they're delicious in salsa. "Much better than the junk food they sell in supermarkets," said vendor Benjamin Rodriguez, showing off his ant stash beside trays of crispy fried crickets and live snails. "All natural," he said with a wry grin.

Rodriguez and the other bug mongers of San Juan offer their wares as pre-Hispanic foods, a nod to the Aztecs, Mixtecs and other civilisations that flourished for millennia on diets rich in grubs, grasshoppers and other edible invertebrates. Insect-eating was long regarded with shame and disgust by elite Mexicans, who viewed the practice as a vestige of rural backwardness.

But bugs have crawled on to the menus of some of the country's most celebrated eateries in recent years, as top chefs seek out esoteric regional ingredients for cuisine known as alta mexicana (high-end Mexican).

"These are foods that were eaten in pre-Hispanic times because there wasn't meat, but now they're seen as luxurious," said Lesley Tellez, a food writer who leads tours of Mexico's markets and kitchens. "It's part of a larger trend of bringing traditional Mexican elements back to the table and giving them [the] value they deserve," she said.

Mexico has some 300 to 550 species of edible insects, more than any country in the world, according to the UN Food and Agriculture Organisation (FAO), which issued a 200-page report this year in praise of entomophagy – insect-eating – as a promising source of sustainable protein. "The case needs to be made to consumers that eating insects is not only good for their health, it is good for the planet," the FAO report read. The tiny comestibles are very high in protein, it noted, especially compared to meats such as beef and pork.

In the poor, rural communities of Mexico's central highlands and southern states, families have been eating insects for generations as tradition, but also out of necessity. "We ate them because we were hungry," said Mario Rendon, a bug supplier at the San Juan market. He said he grew up in the southern state of Guerrero learning to catch and consume them seasonally.

When the rains came in late spring, he and his brothers would accompany their father on cricket-capturing expeditions, trapping them in nets. They also learned to pull meaty grubs – gusanos de maguey – from flowering agave plants.

"Fry them up with a little salt and lime," Rendon said. "Delicious."

Most of Mexico's edible insects are caught wild, not farmed, then sold at regional markets or trucked into the cities. Among the most treasured delicacies are escamoles (ant larvae), cumiles (stink bugs) and ahuatle (water bug eggs), dubbed Mexican caviar. The stink bugs are typically eaten live and are prized for their powerful anise-like flavour and cinnamon finish. Put on a plate or inside a tortilla, they don't exactly sit still.

"Eating them in a taco can be a little weird," said Mexico City restaurant manager Eduardo Lucero. "They sorta escape into your mouth when you bite down." Lucero's restaurant, Corazon de Maguey, offers a seasonal menu in the spring with seven types of insects and has organised mezcal-and-bug festivals to wash the critters down with doses of the strong, agave-derived liquor.

"All the insects sell really well," he said.

But since supplies are irregular, and prices high, they remain mostly a delicacy item in Mexico City restaurants. One exception: the ubiquitous and widely affordable chapulines – grasshoppers or crickets – that are typically sauteed in salt and garlic and rolled in tacos or gobbled by the handful.

"Kids love them," said Ricardo Castañeda, a vendor at the San Juan market who sells three types of the insects: adults, juveniles and a version fried in garlic and olive oil. "They walk by my stall and tell their parents: 'I want some!'"

Castañeda offered a sample. It was crunchy and a bit hollow, almost like eating a bland wafer. With legs.

Though crickets remain abundant in Mexico, other wild-caught insect species have grown more scarce with their growing popularity, and their escalating prices have further accelerated their decline.

In Mexico's Hidalgo state, cradle of the highly prized escamol (ant larvae), nests are routinely destroyed by collectors who leave the colonies exposed to the elements after harvesting the larvae, said escamol entrepreneur Armando Soria.

Soria launched an experiment two years ago, attempting to farm the larvae by transplanting nests and providing abundant food sources for the ants. His harvests have been modest so far, but he says he plans to expand.

"People have a reticence to eating insects," he said. "It's like a mental allergy."

"But they offer delicious flavours," Soria insisted. "They're a solution to so many problems. They don't need tractors or irrigation. Just people willing to give them a try."

This article appeared in Guardian Weekly, which incorporates material from the Washington Post