Following Texas’ successful war of independence against Mexico in 1836, President Martin van Buren refrained from annexing Texas after the Mexicans threatened war. Accordingly, while the United States extended diplomatic recognition to Texas, it took no further action concerning annexation until 1844, when President John Tyler restarted negotiations with the Republic of Texas. His efforts culminated on April 12 in a Treaty of Annexation, an event that caused Mexico to sever diplomatic relations with United States. Tyler, however, lacked the votes in the Senate to ratify the treaty, and it was defeated by a wide margin in June. Shortly before he left office, Tyler tried again, this time through a joint resolution of both houses of Congress. With the support of President-elect Polk, Tyler managed to get the joint resolution passed on March 1, 1845, and Texas was admitted into the United States on December 29.
In July, 1845, Polk, who had been elected on a platform of expansionism, ordered the commander of the U.S. Army in Texas, Zachary Taylor, to move his forces into the disputed lands that lay between the Nueces and Rio Grande rivers. In November, Polk dispatched Congressman John Slidell to Mexico with instructions to negotiate the purchase of the disputed areas along the Texas-Mexican border, and the territory comprising the present-day states of New Mexico and California.
Following the failure of Slidell’s mission in May 1846, Polk used news of skirmishes between Mexican troops and Taylor’s army to gain Congressional support for a declaration of war against Mexico. The President neglected to inform Congress, however, that the Mexicans had used force only after Taylor’s troops had positioned themselves on the banks of the Rio Grande River, which was effectively Mexican territory. On May 13, 1846, the United States declared war on Mexico.
Following the capture of Mexico City in September 1847, Nicholas Trist, chief clerk of the Department of State and Polk's peace emissary, began negotiations for a peace treaty with the Mexican Government under terms similar to those pursued by Slidell the previous year. Polk soon grew concerned by Trist’s conduct, however, believing that he would not press for strong enough terms from the Mexicans, and because Trist became a close friend of General Winfield Scott, a Whig who was thought to be a strong contender for his party’s presidential nomination for the 1848 election. Furthermore, the war had encouraged expansionist Democrats to call for a complete annexation of Mexico. Polk recalled Trist in October.
While Polk would have preferred a more extensive annexation of Mexican territory, he realized that prolonging the war would have disastrous political consequences and decided to submit the treaty to the Senate for ratification. Although there was substantial opposition to the treaty within the Senate, on March 10, 1848, it passed by a razor-thin margin of 38 to 14.
The war had another significant outcome. On August 8, 1846, Congressman David Wilmot introduced a rider to an appropriations bill that stipulated that “neither slavery nor involuntary servitude shall ever exist” in any territory acquired by the United States in the war against Mexico. While Southern senators managed to block adoption of the so-called “Wilmot Proviso,” it nonetheless provoked a political firestorm. The question of whether slavery could expand throughout the United States continue to fester until the defeat of the Confederacy in 1865.