The residents of Matamoros, Mexico, had been watching them for days. One hundred yards across the Rio Del Norte, on its northern bank, General Zachary Taylor and his 3,550 troops—two army infantry regiments and the 2d Dragoons—had been camped out since 28 March 1846. President James Polk's orders in January of that year required that the general and his men march through the disputed territory between two rivers, the Nueces and the Del Norte, also known as the Rio Grande. Ever since the United States had annexed Texas one year before, the Chief Executive considered all land north of the Rio Grande to be part of the new American state of Texas, and thus territory that the United States was bound to protect and defend. The Mexicans, already incensed at the Americans' annexation of their former territory, considered the border to be not the Rio Grande but rather the Rio Nueces, meaning that the land between the two rivers was not apart of Texas at all but rather part of the Mexican State of Tamaulipas. The Mexicans thus regarded any American military presence on that soil as an invasion of Mexican territory and thus an act of war. Anticipating this very disagreement, Polk's orders had been intended to provoke Mexico into starting a war that the president deeply desired.
For a month, while officers from both armies exchanged heated messages back and forth across the river, the women of Matamoros and the American soldiers exchanged flirtations. Encouraged by harsh conditions, low pay, widespread sickness, and the Mexicans themselves, multiple deserters from the U.S. Army fled across the river. Two dragoons, captured on the day of the American army's arrival, were returned to the American ranks, brimming with stories for their comrades of their kind treatment from the Mexicans.
Despite these exchanges, tensions had escalated between the two armies. An American colonel had gone missing, and the patrol sent out after him was ambushed. Mexican General Pedro de Ampudia, having arrived in early April with 3,000 additional troops, had given General Taylor an ultimatum to withdraw back to the Nueces or face the commencement of hostilities. Taylor took Ampudia's message to mean the two nations were at war and blockaded the mouth of the Rio Grande on 15 April. The citizens of Matamoros, with 6,000 Mexican troops now in their midst and their supply route cut off by the Americans, were caught in the middle. By the time General Mariano Arista had arrived to replace Ampudia, a skirmish between Mexican and American patrols had resulted in sixteen American casualties, providing President Polk with the casus belli he needed to declare war. The Mexican-American War had begun.
When, in 1845, Congress authorized the annexation of Texas—a renegade Mexican province that had declared its independence in 1836—Mexico broke off diplomatic relations with the United States. But the Mexican government, weakened by a succession of revolutions and military coups since it won independence from Spain in 1821, soon recognized that diplomacy might be the only way to avoid war with its increasingly aggressive northern neighbor. Texas was not the only bone of contention; the Americans also wanted to take over Mexican lands in California and New Mexico, and private American citizens sought millions of dollars in repayments for losses they claimed to have suffered in Mexican business dealings due to the political chaos there. In September 1845 the Mexicans agreed to negotiate with President Polk's envoy, a Louisiana politician named John Slidell, who offered the Mexicans a deal. The U.S. would assume all liability for the claims of American businessmen against Mexico if the Mexicans would cede to the United States the disputed territory between the Rio Grande and Nueces rivers. The Americans also wanted to buy New Mexico for $5 million and California for $25 million.
Slidell's arrival at the Mexican port of Vera Cruz set off a chain of events that helped to spark another coup. Rumors spread throughout Mexico that President José Joaquin Herrera was about to betray his country by giving away Mexican territory to the Americans. Hoping to protect himself against these charges of treason, Herrera abruptly decided to refuse to meet with Slidell. But it was too late; Major General Mariano Paredes won support from the military and the church to overthrow the Herrera government, promising to resist American encroachments against Mexican interests.
Mexico's refusal to receive Slidell and pursue a negotiated settlement made it plausible for President Polk to claim that he had sought a peaceful solution to America's problems with Mexico, only to be rebuffed and forced to turn to a military solution as a last resort. In fact, Polk deeply desired war with Mexico and the military takeover there helped him get his war. Slidell's rejection led directly to the president's order to General Zachary Taylor to march into the disputed lands south of the Nueces, which in turn led directly to the opening of armed combat. Sixteen American soldiers became casualties in the first skirmish, giving Polk the justification he had been looking for to seek funding from Congress for a war it had never formally authorized. Only fourteen representatives and two senators voted against the spending bill; many of those who did vote for the measure were skeptical of the administration's version of the events that led to the conflict, but for political reasons—especially since the fighting had already begun and without funding the soldiers would be stranded—they did not withhold the war appropriations. While the conflict had a few outspoken and even famous critics, most Americans enthusiastically supported it.
General Santa Anna of Mexico seized power in the early days of the war and mounted a fight that lasted almost two years. But by the end of 1847, General Zachary Taylor had become a national hero in the United States for winning two victories at the Rio Grande and mounting a successful advance into northeastern Mexico, where he took Monterrey and routed Santa Anna's army at the battle of Buena Vista. General Winfield Scott invaded central Mexico via the port of Vera Cruz and—for the first time in American history—U.S. forces took the capital of a foreign nation. Diplomat Nicholas P. Trist negotiated a settlement (which the defeated Mexicans had little choice but to accept) whereby the United States paid $15 million for territory that included Texas (with a southern boundary along the Rio Grande) and most of what later became the American southwest. Mexico lost over half of its territory.