Answer:
-“Following the defeat of the Mexican army and the fall of Mexico City, in September 1847, the Mexican government surrendered and peace negotiations began. The war officially ended with the February 2, 1848, signing in Mexico of the Treaty of Guadalupe Hidalgo.” (History.com)
Explanation: i used history.com which is a great website