The Mexican-American War took place from 1846 to 1848. Mexico lost a large part of its northern territory after the war through the Treaty of Guadalupe Hidalgo.
For citizenship learners, this conflict explains major border changes and why California, Texas, New Mexico, Arizona, and other areas became part of the United States.