After a brief and unsuccessful attempt on the part of the French to establish a colony in Texas in the late 1600s, the Spanish entered Texas, eager to keep the French in Louisiana and far from the wealth of New Spain. Texas then became an important but sparsely populated buffer between the claims of the world powers France and Spain. Spanish Texas, known as the "Kingdom of Texas," lasted between 1690 and 1821 while Texas was governed as a Spanish colony separate from New Spain. The French continued to manuever for control of Texas until they gave up all together and sold all their North American holdings to the United States, which then placed the United States as the threat to the Spanish control of Texas.
In the years following the Louisianna Puchase, American settlers began to move westward into Texas. During this time Mexico fought for and won independence from Spain and in 1821, Texas became part of Mexico. By late 1825, Stephen F. Austin had established along the Brazos River a colony of 300 families, now known in Texas history as the Old Three Hundred and thousands of additional settlers soon flooded into Texas. However, these "Texians," as they were called, were dissatisfied with certain policies of the ruling Mexican government, such as the ban on slavery, the forcible disarmament of Texan settlers, the expulsion of illegal immigrants from the United States, and the expectation of the Mexican government that its citizens should be good members of the Catholic church. The tension grew.
In 1835, President Antonio López de Santa Anna declared himself dictator, abolished the federalist Constitution of 1824, and sought to centralize national power in Mexico City. This caused political unrest throughout Mexico and Santa Anna's efforts to tighten political and economic control over the territory of Texas frustrated the Texian settlers, leading to the Texas Revolution.
The Battle of the Alamo was fought from February 23 until March 6, 1836. The 13-day siege ended with the capture of the mission and the death of nearly all the Texan defenders. The defense of the Alamo proved to be of little military consequence for the Texan cause, but its martyrs were soon hailed as heroes and "Remember the Alamo!" became the battle cry of the Texas Revolution.
However, two important events took place because of that battle. The Texas Declalation of Independence was signed during the battle, on March 2, effectively creating the Republic of Texas. Also, the 13-day holdout stalled Mexican force's progress and allowed General Sam Houston to gather troops and supplies.
After hearing of the defeat at the Alamo, Sam Houston retreated toward the U.S. border, fearing to fight the Mexicans in open country. He also ordered General James Fannin to retreat from his position at Goliad. While Santa Anna hotly pursued Houston's army, Mexican General Urrea overtook Fannin on March 19th, who was slowed down by arms and artillery, just six miles from the fort. After several hours of fighting, Fannin knew he couldn't defeat the Mexican superior force and agreed to terms of surrender. The Texians were marched back to Goliad and held as prisoners. On March 27th, Palm Sunday, under direct order of Santa Anna, the 342 defenseless and unarmed Texians were marched out and executed.
As you can imagine, the news of the Goliad Massacre infuriated Houston's army. Tired of running away and angered by Houston's indecisiveness, the rebel army moved to face their enemy at San Jacinto. Early in the morning of April 21, the Texan army of 900 men surged forward, catching the footsore and road-weary Mexicans by surprise. Eighteen minutes later, the battle was over, with 630 Mexicans killed and over 700 captured. This decisive battle resulted in only nine Texan casualties and independence from Mexico. Santa Anna was captured the next day, signed the Treaties of Velasco, and was released on the condition that he recognize the newly formed Republic. But when Santa Anna returned to Mexico, the government never recognized the loss or independence of Texas and declared its intention to recapture what it considered a breakaway province.
Most Texans were in favor of annexation by the United States, but anti-slavery Northerners feared that admitting another slave state would tip the balance of national power to the slave-holding South, and they delayed Texas's annexation for almost a decade. Finally, Texas was admitted to the union in 1845, when it became the 28th state.
The Mexican government complained that by annexing its "rebel province," the United States had intervened in Mexico's internal affairs and unjustly seized its sovereign territory. The United States tried to negotiate a purchace of the lands in question, but Mexico was neither inclined nor in a position to negotiate, and the Mexican-American War of 1846-1848 followed. The Treaty of Guadalupe Hidalgo, signed on February 2, 1848, ended the war and gave the U.S undisputed control of Texas as well as California, Nevada, Utah, and parts of Colorado, Arizona, New Mexico, and Wyoming.