"Dorilocos" are a bag of Doritos chips, deranged. Here's how they're made. (Nick Miroff/The Washington Post)

The streets of metropolitan Mexico City (population 20 million) are many things, not all of them pleasant.

They are crowded, yes. Malodorous, at times. Dirty, sure. They are also one of the world’s great incubators of snack-food experimentation, where street vendors slather mayo and cheese on grilled corncobs, and carve mangoes into flowering fruit bouquets.

Perhaps, then, it was only a matter of time before someone gazed upon a bag of Nacho Cheese Doritos, a product boasting no fewer than 27 ingredients, and thought: these need more.

That appears to be how Dorilocos — Crazy Doritos — came along.

They are not for the faint of tongue nor weak of stomach. But Dorilocos are a testament to the culinary inventiveness and intense competition on Mexico’s streets, where it’s simply not enough to sell processed snack food as its manufacturers intended.

Street vendors sell"Crazy Doritos" in Mexico City's Santo Domingo neighborhood on Oct. 16, 2014. (Nick Miroff)

“They’re good, but whoa, that’s a lot of different things all at once,” said Gabriela Doroteo, sampling Dorilocos for the first time at the behest of her 12-year-old son, Yael.

She held a plastic fork in one hand. Her other cradled a bag of Nacho Cheese Doritos sliced open, lengthwise, then heaped with grated carrots, jicama, cucumber, pickled pork rinds, peanuts, jellied candies, lime juice, two kinds of chili powder, and swirls of several kinds of fruity syrup and hot sauce.

It was a veritable insane asylum of sugar and spice. It looked like a Jackson Pollock painting dumped in a chip bag.

“They’re just a fad,” scoffed Carlos Gonzalez, a pushcart tamale vendor, watching teens and young adults line up at the Dorilocos stalls across the street. “They’re for kids,” he said, “and people who don’t have to worry about gastritis.”

No one is sure of Dorilocos’s precise origins. Some say they are a northern invention concocted somewhere along the border. Others trace them to the rough barrios that ring Mexico City. There are Dorilocos fan pages on Facebook and DIY YouTube videos about how to make them.

Evelia Alcala first encountered Dorilocos about a year ago at the outdoor market in her gritty Santo Domingo neighborhood in southern Mexico City. “I tried them,” she said, “and I said to myself: I can do better.”

She had been selling socks and backpacks on the street for six years until then. Then she began experimenting with spice combinations and sauces until she found the right blend. Now she serves about 300 Dorilocos a week from her stall, just down the street from Mexico’s National Autonomous University and the adjacent metro station.

Though the Mexican government has launched a public health campaign against junk food, Alcala insists that while Dorilocos may be crazy, they are not junk. “Look at all the vegetables,” she said, pointing to plant material buried under all the gooey sauces.

Alcala sells them for 18 pesos, about $1.50. The bag of chips alone costs her nearly half that.

“My son hurt his knee and needed surgery last year,” she said. “I was able to pay for it with my Dorilocos.”

Alcala named her stall Dorilocos La Sonrisa — roughly, Crazy Doritos with a Smile, decorating it with colorful banners that depict several chip brands loaded with toppings. Other variations include Fritolocos (a more portable version of Frito Pie) and PapiLocos, made with Ruffles.

At the ready are other Dorito flavors: Pizza, Flaming Hot, Devil-Hot and a milder one called Incognito. But the rojos — Nacho Cheese — are the Dorilocos standard. It is only fitting.

Nacho Cheese Doritos were introduced by the late Frito-Lay executive and snack icon Arch West after his encounter in 1964 with a Mexican vendor’s cheese-sprinkled corn chips at Disneyland, according to Gustavo Arellano, author of “Taco USA: How Mexican Food Conquered America.”

Having swept across the United States, the Nacho Cheese Dorito went home, in a sense, to Mexico, returning in slightly spicier form but with the same red sack.

Younger generations of Mexicans no longer look down on Mexican flavors and dishes that originate or take new forms up north, Arellano said.

“Things have changed in terms of Mexican acceptance of American bastardization of Mexican food,” he said, “especially in the borderlands.”

Mexico’s Doritos are made by Sabritas, which, like Frito-Lay, is a PepsiCo brand. And lately, even Sabritas has gotten behind the Dorilocos craze, providing vendors like Alcala with business signs that say “Dorilokos — Mix up your Snack!”

Alcala isn’t sure why the company spells it with a K, but it may be to avoid conflict with Taco Bell, which recently began offering Doritos Locos Tacos and Fiery Doritos Locos in chip-flavored taco shells.

They look positively sane next to a packed pouch of gummy candy and pickled pork rinds — apparently one of the most popular toppings.

“They are a familiar Mexican food with continuity to the past,” said Jeffrey M. Pilcher, a historian and author of “Planet Taco: A Global History of Mexican Food.”

“It’s a classic example of innovation that, in its own bizarre way, stays true to the cuisine.”