The Mexican-American War began as the United States increasingly embraced the idea of Manifest Destiny and sought to expand its territory westward. President James K. Polk provoked Mexico into war by sending troops into disputed land along the Texas border. The U.S. then rapidly gained victories over Mexico, conquering northern Mexico. In 1848, the Treaty of Guadalupe Hidalgo ended the war, forcing Mexico to cede much of the modern-day American Southwest and California to the United States.