Mexico gained its independence from Spain in 1821 following 11 years of conflict. With independence achieved, Mexico struggled to find its own independent identity, first establishing a monarchy then a constitutional republic. The need to protect the northern frontier prompted the government to establish colonization laws that allowed colonists into Texas. Large groups of people moved to Texas, with the attraction of land and an opportunity to start over. People, such as Stephen F. Austin, helped to facilitate the arrival of immigrants to Texas by ways of colonies and land grants. Many of these colonists, along with the native population, enjoyed a semi-autonomous way of life far from the capital in Mexico.
The Texas colonists’ autonomy was challenged with the centralization of power in Mexico City. In 1833, Antonio Lopez de Santa Anna was elected President of Mexico. When he abolished the Constitution of 1824, it prompted a Mexican Civil War and the Texas independence movement. His political views would change from federalism to centralism, causing Mexico to fall into a civil war and Texas to seek its own independence. Laws changed curtailing the influx of immigrants as well as the autonomy that Texans had grown used to. Texas, with its lower population, was joined to the neighboring state of Coahuila, forming the state of Coahuila y Texas.