From chili and nachos to fajitas and enchiladas, Tex-Mex could be called the ultimate comfort food. Despite its enormous popularity all over the United States, it’s an understatement to say that Tex-Mex has struggled to get respect as a regional cuisine in its own right, rather than a lower-quality, corrupted version of traditional Mexican food. But with deep roots in both Spanish and Native American culture, the history of Tex-Mex cuisine—and the stories behind some of its most famous dishes—is worth another look.

Native Americans lived in the area that is now Texas for thousands of years before the first European settlers arrived in the early 1500s. For more than 300 years after that, Texas (like Mexico) was part of the Spanish colony known as New Spain, and Texas and Mexico remained linked after 1821, when the latter separated itself from Spain. Texas, of course, won its own independence 15 years later, and became part of the United States in 1845. Throughout this complicated history, and in the years since, a number of cultures—and culinary traditions—have been inextricably combined to produce what is known as Tex-Mex cuisine today.

The term “TexMex” (with no hyphen) originally began as an abbreviation for the Texas and Mexican Railroad, chartered in 1875. By the 1920s, some people were using “Tex-Mex” (with hyphen added) to describe people of Mexican descent living in Texas—more accurately called Tejanos—and eventually the label would be applied to the Mexican-style food typical of the region.

Adapted from Tejano home cooking, Tex-Mex cuisine made its way to a larger audience for the first time in San Antonio in the 1880s, largely thanks to the cheap, delicious food dished out by a group of women known as the “chili queens” in the city’s plazas. A steaming bowl of chili con carne—now one of Tex-Mex’s signature dishes—alongside bread and a glass of water went for a dime in those days, drawing crowds of locals and tourists alike. The growing fame of the chili queens helped San Antonio establish its enduring reputation as the capital of Tex-Mex cuisine.

By the time of the 1893 World’s Fair in Chicago, fairgoers were able to purchase the delectable meat, beans and chili pepper stew at the “San Antonio Chili Stand.” Around the same time, a German immigrant from New Braunfels, Texas, named Willie Gebhardt moved to San Antonio and started selling his own brand of chili powder, a savory mix of ground ancho chilies, cumin, oregano and black pepper. Though traditional Mexican cooks disdained the pre-mixed blend of flavors, the convenience of Gebhardt Eagle Chili Powder made it a hit.

San Antonio was also the birthplace of another Tex-Mex standard: the combo plate. In 1900, Chicago-born Otis Farnsworth of the Original Mexican Restaurant in the city started the trend of serving an entree alongside rice and beans, calling it “the Regular.” Many Mexican restaurants in Texas began copying the idea of the combination platter, often topped with sour cream and melted cheese, and it became a signature of Tex-Mex cuisine.

Nachos, yet another Tex-Mex staple, were reportedly born about half a century later, and unlike many of the cuisine’s dishes they boast a specific creation story (though not everyone chooses to believe it). As the story goes, in 1943 a group of military wives from Eagle Pass in Texas made a short trip over the Rio Grande into Piedras Negras, located in the Mexican state of Coahuila. When they stopped for a cocktail-hour snack at the Victory Club restaurant (or the old El Moderno, depending on your source), they were greeted by a maître d’ named Ignacio Anaya, known to his friends as Nacho. As no one was in the kitchen yet, Anaya concocted an impromptu plate of sliced fried corn tortillas topped with melted cheese and jalapeño strips on top. The ladies devoured the result, and spread the word about what became known as “Nacho’s Especial.”

Even as the popularity of chili, nachos, enchiladas and fajitas spread to other parts of the United States, these dishes were still considered Mexican food until the early 1970s, when cookbook author Diana Kennedy inadvertently turned Tex-Mex into its own regional cuisine. In her 1972 cookbook “Cuisines of Mexico,” the English-born author made a clear distinction between “authentic” Mexican food served in Mexico and the stuff served north of the border. Having spent decades studying and transcribing the recipes and cooking techniques of her beloved Mexico, Kennedy had no use for the “mixed plates” served in Mexican restaurants north of the border.

Though chefs and fans of Tex-Mex food were insulted by Kennedy’s characterization, it was her work that popularized the term and put Tex-Mex squarely in its own category as an American cuisine, with its own distinctive flavors. For example, the heavy use of cumin (relative to traditional Mexican cooking) can apparently be traced back to the 1500s, when the Spanish brought workers of Moroccan descent from the Canary Islands to their settlements in the San Antonio region. As a result, Moroccan cooking, with its heavy use of cumin and garlic, became part of the complex and interesting history of Tex-Mex cuisine.