President Polk declares war on Mexico
The president of United States, James K. Polk commissioned a delegation of negotiators led by the diplomat John Slidell, to go to Mexico and offer purchase of California and New Mexico. USA already had annexed the Republic of Texas, in December 29, 1845.
President Antonio López de Santa Anna declined the offer, despite having being weakened by the war trying to defend Texas, as well as by internal political struggles between federalist liberals and centralist conservatives in Mexico.
Blood on the Rio Grande: The Mexican-American War.
The advance of US troops commanded by General Zachary Taylor, (nicknamed as "Old, Rough, and Ready") alerted Mexicans. President López de Santa Anna considered that this was an act of aggression and declared war to United States the July 7 of 1846.
Gen. Zachary Taylor at the Battle of Buena Vista; The Granger Collection, New York
The conflict ended with the signing of Treaty of Guadalupe-Hidalgo, on February 2, 1848 under which Mexico yielded to United States the territories from New Mexico to California, which included Utah, almost half of Mexican territory. In compensation, USA paid $15 million to Mexico.
Results of the Mexican War