force to San Antonio de Béxar (or Béxar), where his troops defeated the Texian garrison in the Battle of the Alamo, killing almost all of the defenders. A newly created Texian army under the command of Sam Houston was constantly on the move, while terrified civilians fled with the army, in a melee known as the Runaway Scrape. On March 31, Houston paused his men at Groce's Landing on the Brazos River, and for the next two weeks, the Texians received rigorous military training. Becoming complacent and underestimating the strength of his foes, Santa Anna further subdivided his troops. On April 21, Houston's army staged a surprise assault on Santa Anna and his vanguard force at the Battle of San Jacinto. The Mexican troops were quickly routed, and vengeful Texians executed many who tried to surrender. Santa Anna was taken hostage; in exchange for his life, he ordered the Mexican army to retreat south of the Rio Grande. Mexico refused to recognize the Republic of Texas, and intermittent conflicts between the two countries continued into the 1840s. The annexation of Texas as the 28th state of the United States, in 1845, led directly to the Mexican–American War. Background After a failed attempt by France to colonize Texas in the late 17th century, Spain developed a plan to settle the region. On its southern edge, along the Medina and Nueces Rivers, Spanish Texas was bordered by the province of Coahuila. On the east, Texas bordered Louisiana. Following the Louisiana Purchase of 1803, the United States also claimed the land west of the Sabine River, all the way to the Rio Grande. From 1812 to 1813 anti-Spanish republicans and U.S. filibusters rebelled against the Spanish Empire in what is known today as the Gutiérrez–Magee Expedition during the Mexican War of Independence. They won battles in the beginning and captured many Texas cities from the Spanish that led to a declaration of independence of the state of Texas as part of the Mexican Republic on April 17, 1813. The new Texas government and army met their doom in the Battle of Medina in August 1813, 20 miles south of San Antonio, where 1,300 of the 1,400 rebel army were killed in battle or executed shortly afterwards by royalist soldiers. It was the deadliest single battle in Texas history. 300 republican government officials in San Antonio were captured and executed by the Spanish royalists