During the post 1815 cotton boom, settlers poured into Eastern Texas in search of farmland. After the Panic of 1819, many indebted Americans fled to Texas to escape creditors. By 1823, about 3,000 Americans lived in Texas. In 1824, the Mexican government, which owned Texas, began to actively encourage the American colonization of Texas in order to promote trade and development. By 1830, about 7,000 Americans lived in Texas, outnumbering Hispanic settlers two to one. The Mexican government gave large land grants to agents, called empresarios, who contracted to travel East to recruit settlers. Many of these empresarios were widely successful, and some, like Stephen F. Austin, the most successful of all, gained great influence both with the Mexican government and the Texan settlers.
Some Americans were a source of trouble for the American government. Harlan Coffee, an infamous American trader, provoked Indians to raid Mexican settlements to seize livestock for trade with Americans. Violence erupted as early as 1826, when an American empresario, Haden Edwards, led a revolt against Mexican rule. However, Stephen Austin and other American settlers disapproved of the revolt, and without support, Edwards was crushed easily by Mexican forces. In 1830, Mexico closed Texas altogether to American immigration and forbade the introduction of additional slaves to the territory. However, Mexico lacked the power to enforce this decree. Between 1830 and 1834, the American population in Texas doubled. Finally, in 1834, the ban on immigration was lifted, and by 1835, over 1,000 Americans per month were entering Texas.
Meanwhile, the Mexican government grew increasingly unstable. In 1834, Mexican President Antonio Lopez de Santa Anna ousted leading liberals from the Mexican government and began to place stern restrictions on the independent powers of the governments of the Mexican territories. His actions ignited a number of small rebellions throughout the West. Santa Anna's brutality in crushing early rebellions alarmed Stephen Austin and other Americans. At first Austin wished to cooperate with Mexican liberals remaining in power to restore greater independence for Texas, but did not advocate a movement for total independence. However, in 1834, after Santa Anna's sudden usurpation of complete power, Austin became convinced of the need for independence and the Texas Rebellion began in earnest. In late February 1836, Santa Anna's force of 4,000 troops laid siege to the town of San Antonio, where 200 Texans resisted, retreating to an abandoned mission called the Alamo. After inflicting over 1,500 casualties on Santa Anna's men, the defenders of the Alamo were wiped out on March 6, 1836. To add insult to injury, a short while later Mexicans massacred 350 Texan prisoners at Goliad.
Even before these events, Texan leaders had met and declared Texas independent. They chose Sam Houston as their president, and Houston traveled East to gather recruits. In April 1836, Houston surprised Santa Anna's troops on a prairie near the San Jacinto River. Shouting "remember the Alamo," Houston's 800 men broke through the Mexican lines and killed nearly two-thirds of Santa Anna's men in fifteen minutes, taking Santa Anna himself as a prisoner. He was forced to sign a treaty recognizing Texas as independent.
Texas was the natural target for early far western expansion due to its proximity to the settled Southwest and because it was not buffered by mountains, as were New Mexico and California. Settlers from the southwestern states seeking farmland on which to grow cotton could venture into Texas relatively easily, with minimal preparation compared to that needed for the long overland journey beyond the Rocky Mountains. Settlers fearing the instability of life on the frontier knew that they could more easily return from Texas than from any other western destination. In the 1820s, Americans found conditions in Texas to be much to their liking. The Mexican government encouraged immigration and strove to ease the process for Americans, allowing them a great degree of freedom in choosing the location of settlements and the political organization as well. This was a sharp contrast to the United States government, which throughout the settlement of the American West, had been ever present in the lives of the western settlers.
The major threat to peace between the American settlers and the Mexican government took the form of devious and self-serving individuals such as Harlan Coffee, but even ordinary, law-abiding Americans presented a problem. Though they themselves were naturalized Mexican citizens, the Americans distrusted the Mexican settlers for racist reasons, and complained often of disorganization and corruption in the Mexican government. Mexican authorities, for their part, increasingly lamented their inability to regulate immigration in the vast Texas territory. In 1828, Mexican General Manuel Mier y Teran reported that the Americans had established functioning farming communities even before the Mexican government was aware of their presence in Texas. Mier y Teran killed himself four years later in despair over Mexico's inability to stem the flow of American immigrants, who by then far outnumbered the Hispanic settlers and controlled the economy and identity of Texas.
The late 1820s and early 1830s saw the widening of the rift between the American settlers and the Mexican government. American allegiance steadily declined and there was frequent talk of rebellion and revolution, even calls for independence. Though most opposed revolts such as that led by Haden Edwards, many began to question the Mexican government's ability to rule the Texas territory. When Mexico banned the further importation of slaves to Texas, many Americans changed their views. The majority of early immigrants to Texas were cotton farmers, most of which used slaves extensively in their farming. They saw the ban on the introduction of additional slaves as the act of a tyrannical government that was growing more and more antagonistic each day. However, cooler heads, such as Stephen F. Austin's, prevailed, and revolt was considered too drastic to be considered. The settlers innstead hoped for a compromise with the Mexican government, under which Texas would remain loyal to Mexico economically and emotionally, but would enjoy a measure of political independence, and open borders. This possibility was destroyed by Santa Anna's actions of 1834, and Texas inhabitants believed he would only continue to restrict their freedom. As a result, Texas leaders formed the framework of independent government and organized for independence, which they strove for zealously. Though the military defeat of Santa Anna's troops was undeniable, and Santa Anna himself signed the treaty that granted Texas its independence, the Mexican government never ratified the treaty, and Texas, though the Texans considered it independent, would remain a source of controversy for years to come.