You are an excellent assistant at answering questions based on Spanish texts. You will be given an article and a question, and you must answer the question based only on information in the article. The response should be extracted from the context verbatim.

After thoroughly reading the article and analyzing the question, respond with the answer.

Title:
Spanish_language_in_the_United_States

Context:
In 1821, after Mexico's War of Independence from Spain, Texas was part of the United Mexican States as the state of Coahuila y Tejas. A large influx of Americans soon followed, originally with the approval of Mexico's president. In 1836, the now largely "American" Texans, fought a war of independence from the central government of Mexico and established the Republic of Texas. In 1846, the Republic dissolved when Texas entered the United States of America as a state. Per the 1850 U.S. census, fewer than 16,000 Texans were of Mexican descent, and nearly all were Spanish-speaking people (both Mexicans and non-Spanish European settlers who include German Texan) who were outnumbered (six-to-one) by English-speaking settlers (both Americans and other immigrant Europeans).[citation needed]

Question:
Was Texas a part of Mexico?

In 1821, after Mexico's War of Independence from Spain, Texas was part of the United Mexican States as the state of Coahuila y Tejas