The Mexican American War
In 1844, President James K. Polk attempted to buy a large amount of land from Mexico, including what is now California and Utah. Mexico refused to sell the land. Polk still wanted the land, so he moved U.S. soldiers into Mexican territory. In 1846, a group of these troops were attacked by Mexican troops, so the U.S. went to war. The war ended with a treaty after the Americans captured Mexico City. At the end of the war, Mexico agreed to sell all of its land northward of the Rio Grande.
In this modern day map of the United States, the area highlighted in green is the area that was gained after the Mexican American war.