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.