Texas had largely been settled by Americans from the Southern United States, and many of those settlers owned slaves despite an 1829 Mexican law that abolished slavery. Many in the United States and Texas thus favored the admission of Texas into the union as a slave state. Adams considered the issue of Texas to be "a question of far deeper root and more overshadowing branches than any or all others that agitate the country", and he emerged as one of the leading congressional opponents of annexation.  When he served as secretary of state, Adams had sought to acquire Texas, but he argued that, because Mexico had abolished slavery, the acquisition of Texas would transform the region from a free territory into a slave state. He also feared that the annexation of Texas would encourage Southern expansionists to pursue other potential slave states, including Cuba. Adams's firm stance may have played a role in discouraging Van Buren from pushing for the annexation of Texas during his presidency.[185]
Whig nominee William Henry Harrison defeated Van Buren in the 1840 presidential election, and the Whigs gained control of both houses of Congress for the first time. 