The Navy played a role in two major operations of the Mexican–American War (1845–1848); during the Battle of Veracruz, it transported the invasion force that captured Veracruz by landing 12,000 troops and their equipment in one day, leading eventually to the capture of Mexico City, and the end of the war. Its Pacific Squadron's ships facilitated the capture of California.