MEXICO CITY — The first bite of chiles en nogada, a traditional Mexican dish eaten around the country’s independence celebrations, sends a shiver. The salty skin of the poblano chile crunches, the pomegranate seeds that dot it explode between your teeth and the flavors combine to dance in the mouth. Almost instantly, the creamy walnut sauce permeates the meat filling, and just when your palate asks, “What is this deliciousness?” the spices kick in and your senses ask for more.

This sensory cocktail isn’t made in just any kitchen. And it can take hours to prepare — meaning only some chefs and true fans of the complicated recipe are willing to sharpen their knives and dedicate two days each year to stuffing the relatively unspicy chiles.

In the kitchen of Arango, a Mexico City restaurant that opened last year, a smile spreads across the face of chef Alejandro Cuatepotzo when one speaks about the balance struck by the sweet and salty food.

The dish is traditionally eaten from July through September, and Cuatepotzo estimates he serves up to 100 plates each week during the season.

To do that, his staff of 14 chefs work eight days per month to prepare a recipe that dates to the 19th century and involves, in his case, 30 ingredients.

A chile en nogada dish at Testal, a restaurant in Mexico City, on Sept.13, 2019. Rebecca Blackwell / AP

Cuatepotzo and chiles en nogada were born in the same place: the central state of Puebla.

Versions of the dish’s origin vary, but Ricardo Muñoz Zurita — another Mexican chef who is an expert in local cuisine — says that they were prepared for the first time on Aug. 28, 1821.

Gen. Agustín de Iturbide had just signed a treaty giving Mexico its independence from Spain and was on his way to the capital when he stopped in Puebla, where nuns served him chiles en nogada to honor him and celebrate the end of colonization. For that reason, Muñoz Zurita says, the dish displayed the colors of Iturbide’s army banner and the soon-to-be Mexican flag: green, white and red.

It also won the favor of Iturbide, who asked that he be served the dish again in Mexico City.

Nearly 200 years later, chiles en nogada are now a favorite of many.

According to Muñoz Zurita, it’s almost “mythical” because it’s so ephemeral: its key ingredients are only available three months of the year, so it isn’t prepared outside of the season.

Some Mexicans spurn the dish because they find the combination of flavors disagreeable, but in general, it sets off a frenzy evident on social media, with images of chiles en nogada commonly shared before they’re devoured.

Many restaurants try to put their own stamp on the dish, too. One ice cream shop offers a “nogada” flavor of walnuts, cheese, sherry, milk and sugar, while a hamburger joint promotes a chile on a bun with lettuce.

At Arango, chiles en nogada are listed for $17 (350 pesos), but they can also be found in popular eateries for $7 (150 pesos), with more affordable versions often substituting costlier ingredients like walnuts and pine nuts with less expensive ones.

On a recent day, Cuatepotzo scrawled his recipe for one of the jewels of Mexican gastronomy on a sheet.

It called for 10 kilograms (22 pounds) of beef, loads of fruit and some ingredients which are available in any supermarket: pork, tomatoes, onions, figs, cinnamon, thyme, and oregano — in addition to others that few would have in their cupboard: panochera apples, milk pears and local peaches that only grow in the municipality of Calpan.

The result explodes with the first bite in a marvelous marriage of origin, history and flavor.

Follow NBC Latino on Facebook, Twitter and Instagram.