A decade after gaining its independence from Mexico, Texas accepted annexation into the United States on Dec. 29, 1845. Because Texas came in as a slave state, this created controversy nationwide. It also triggered the short Mexican-American War, which the United States won decisively.
After winning its own independence from Spain, Mexico welcomed immigrants into its sparsely-populated territory. Americans happily complied, and within only a few years outnumbered the native Mexicans. The Mexican government, largely controlled by wealthy Hispanic ranchers, was alarmed at the growth of American settlers. They passed a law in 1830 banning immigration from the United States, except in special cases. This and other regulations inhibiting the growth of American immigrant influence led to an American rebellion. In conjunction with disenfranchised Hispanic Mexicans, the Americans successfully revolted and established Texas as an autonomous nation in 1836.
Mexico, however, refused to recognize Texas' independence and threatened war if the new nation joined the United States. Because of this and the fact that Texas would enter the Union as a slave state, the Northern states fought its annexation for a decade. However, Texas pushed hard to be a state, in part because its enormous debts left its independent future in doubt. In the final deal, Texas would be added to the Union provided it ceded a large segment of territory in the north to the federal government, which would develop those areas into free states.