structural:reformatting, structural:expansion
Republic

Within Mexico, tensions continued between federalists and centralists. In early 1835, wary Texians formed Committees of Correspondence and Safety. The unrest erupted into armed conflict in late 1835 at the Battle of Gonzales. This launched the Texas Revolution. Texians elected delegates to the Consultation, which created a provisional government. The provisional government soon collapsed from infighting, and Texas was without clear governance for the first two months of 1836.

Mexican President Antonio López de Santa Anna personally led an army to end the revolt. General José de Urrea defeated all the Texian resistance along the coast culminating in the Goliad massacre. López de Santa Anna's forces, after a thirteen-day siege, overwhelmed Texian defenders at the Battle of the Alamo. News of the defeats sparked panic among Texas settlers.

The newly elected Texian delegates to the Convention of 1836 quickly signed a declaration of independence on March 2, forming the Republic of Texas. After electing interim officers, the Convention disbanded. The new government joined the other settlers in Texas in the Runaway Scrape, fleeing from the approaching Mexican army.

After several weeks of retreat, the Texian Army commanded by Sam Houston attacked and defeated López de Santa Anna's forces at the Battle of San Jacinto. López de Santa Anna was captured and forced to sign the Treaties of Velasco, ending the war. The Constitution of the Republic of Texas prohibited the government from restricting slavery or freeing slaves, and required free people of African descent to leave the country.

Political battles raged between two factions of the new Republic. The nationalist faction, led by Mirabeau B. Lamar, advocated the continued independence of Texas, the expulsion of the Native Americans, and the expansion of the Republic to the Pacific Ocean. Their opponents, led by Sam Houston, advocated the annexation of Texas to the United States and peaceful co-existence with Native Americans. The conflict between the factions was typified by an incident known as the Texas Archive War. With wide popular support, Texas first applied for annexation to the United States in 1836, but its status as a slaveholding country caused its admission to be controversial and it was initially rebuffed. This status, and Mexican diplomacy in support of its claims to the territory, also complicated Texas's ability to form foreign alliances and trade relationships.

The Comanche Indians furnished the main Native American opposition to the Texas Republic, manifested in multiple raids on settlements. Mexico launched two small expeditions into Texas in 1842. The town of San Antonio was captured twice and Texans were defeated in battle in the Dawson massacre. Despite these successes, Mexico did not keep an occupying force in Texas, and the republic survived. The cotton price crash of the 1840s depressed the country's economy.