
In 1836, Texas declared independence from Mexico due to political and cultural conflicts, including disputes over immigration, laws, and governance. After several confrontations, most notably the Battle of the Alamo and the Goliad Massacre, Texan forces led by Sam Houston achieved a decisive victory at the Battle of San Jacinto on April 21, 1836. Mexican General Santa Anna was captured, and, under pressure, signed treaties granting Texas its independence. The Republic of Texas was officially established, adopting a constitution and electing Sam Houston as its first president. Texas remained an independent nation until joining the United States in 1845.