section_path: History/Battle of Mexico City in the U.S.–Mexican War of 1847
section_name: Battle of Mexico City in the U.S.–Mexican War of 1847
paragraph_text: Battle of Mexico City in the U.S.–Mexican War of 1847
  
  During the 19th century, Mexico City was the center stage of all the political disputes of the country. It was the imperial capital on two occasions (1821–1823 and 1864–1867), and of two federalist states and two centralist states that followed innumerable coups d'états in the space of half a century before the triumph of the Liberals after the Reform War. It was also the objective of one of the two French invasions to Mexico (1861–1867), and occupied for a year by American troops in the framework of the Mexican–American War (1847–1848).
  
  The Battle for Mexico City was the series of engagements from 8 to 15 September 1847, in the general vicinity of Mexico City during the U.S. Mexican War. Included are major actions at the battles of Molino del Rey and Chapultepec, culminating with the fall of Mexico City. The U.S. Army under Winfield Scott scored a major success that ended the war. The American invasion into the Federal District was first resisted during the Battle of Churubusco on 8 August, where the Saint Patrick's Battalion, which was composed primarily of Catholic Irish and German immigrants but also Canadians, English, French, Italians, Poles, Scots, Spaniards, Swiss, and Mexicans, fought for the Mexican cause, repelling the American attacks. After defeating the Saint Patrick's Battalion, the Mexican–American War came to a close after the United States deployed combat units deep into Mexico resulting in the capture of Mexico City and Veracruz by the U.S. Army's 1st, 2nd, 3rd and 4th Divisions. The invasion culminated with the storming of Chapultepec Castle in the city itself.
  
  During this battle, on 13 September, the 4th Division, under John A. Quitman, spearheaded the attack against Chapultepec and carried the castle. Future Confederate generals George E. Pickett and James Longstreet participated in the attack. Serving in the Mexican defense were the cadets later immortalized as Los Niños Héroes (the "Boy Heroes"). The Mexican forces fell back from Chapultepec and retreated within the city. Attacks on the Belén and San Cosme Gates came afterwards. The treaty of Guadalupe Hidalgo was signed in what is now the far north of the city.