When the United States admitted Texas to the Union in 1845, the Mexican government was in such turmoil that the nation's new leader would not even meet with the Americans; they were too weak even to negotiate concessions. Both sides awaited the outbreak of violence. On May 9, 1846, President James K. Polk received word that Mexican forces had ambushed two of General Zachary Taylor's companies along the Rio Grande. He immediately demanded that Congress appropriate funds for war, proclaiming that the Mexicans had initiated a full- blown conflict. Somewhat reluctantly, Congress agreed, and the Mexican War began.
The Mexican War lasted one and a half years, and ranged all throughout Texas, New Mexico, and California, and even into the Mexican interior. Mexican resistance was stubborn and benefited from greater manpower than US forces, but ultimately proved futile. The US won an easy victory due to superior artillery and leadership. The Treaty of Guadalupe Hidalgo, signed February 2, 1848, ceded Texas, New Mexico, and California to the US, completing American claims to land all the way across the continent. In return, the US assumed all monetary claims of US citizens against the Mexican government and paid Mexico $15 million. The West was now officially open and secure to Americans.
Despite patriotism engendered by the war, sectional conflict grew more dramatic between 1846 and 1848. Not all of this was due to expansion. Polk created many enemies in the North through his lack of support for tariffs and in the West for his failure to initiate internal improvement. However, expansion and the future of slavery generated far greater conflict during the pre-Civil War era. Proslavery Democrats and antislavery Whigs raged against one another in Congress and in the press over the future of slavery in the expanded West.
Every solution to the problem of slavery created controversy. A Democratic congressman from Pennsylvania named David Wilmot introduced an amendment to an appropriations bill regarding the West known as the Wilmot Proviso. The proviso stated that slavery should be outlawed in all territory other than Texas ceded to the US by Mexico. Supported in the North, the proviso passed the House of Representatives but stalled in the Senate. Southern Democrats responded violently to any suggestion that slavery be abridged south of the line set by the Missouri Compromise: 36 degrees, 30 minutes latitude.
In the election of 1848, Zachary Taylor won the presidency as the Whig candidate. Both the Whigs and the Democrats tried to skirt the issue of slavery, the Whigs presenting no clear platform, and the Democrats endorsing the concept of popular sovereignty under which settlers would decide the issue of slavery for themselves. Soon the expansion Westward grew at such a rapid pace that politicians could no longer afford not to come up with a distinct decision regarding slavery. In January 1848, an American carpenter living at the base of the Sierra Nevada Mountains discovered gold in California. Within months, a frantic gold rush was in full swing. Overland immigrants to California totaled 400 in 1848, 25,000in 1849, and 44,000 in 1850.
Polk saw in a Mexican War the opportunity to advance toward California and New Mexico and complete the American sweep West. Reports from California suggested that the citizens there would accept American rule. Many Whig members of Congress believed that Polk was escalating a small skirmish into a call for general war for the purpose of expansion and the extension of slavery into the West. However, remembering that the Federalists had destroyed their party by opposing the War of 1812, many reluctantly went along with Polk's demands for appropriations.