On April 26, 1846, a detachment from Zachary Taylor’s army under Captain Seth Thornton was ambushed by a numerically superior Mexican force near Brownsville, Texas. Nearly all of the Americans were captured or killed.
Mexico fired the first shot of the Mexican-American War, but the United States had been preparing for war at the border for months. Both sides anticipated the war, and the hostility was mutual.
The Rio Grande was the southern border of Texas that Antonio Lopez de Santa Anna accepted in the Treaty of Velasco after the Battle of San Jacinto, when Texas established its independence. Due to political tumult, Mexico did not ratify the treaty, but the Rio Grande was nonetheless the border observed by both Texas and Mexico during the following ten years, and the United States upon the annexation of Texas in 1845. Mexico began insisting that the southern border of Texas was actually the Nueces River rather than the Rio Grande. Texas may have had little legal authority in their assertion that the Rio Grande was the border (as the treaty was not ratified), but Mexico had none whatsoever to support their own claim. In any event, it seemed that a contest of arms was the only way to clarify the situation.
On March 3, 1845, one of John Tyler’s last acts in the White House was to dispatch an annexation offer to Texas. The next day, President Polk was sworn in, promising to see the process through completely. In June, Texas accepted the offer. Once that was finalized, in July 1845, President Polk sent General Zachary Taylor to Corpus Christi in order to enforce the border and prepare for the inevitable conflict.
Meanwhile, in Mexico, there was not such a steady progression of preparation for war, or really any progression of anything at all. In 1846 Mariano Peredes was the President of Mexico, dealing with constant contention, insurrection, and economic instability. He sent General Mariano Arista with the Army of the North to the border in response to Taylor’s machinations in Texas. Arista ordered Anastasio Torrejon to cross the border with around 1,600 men, and upon encountering Thornton’s patrol, he attacked. War had begun.