The 5 occupations of Mexico from foreign powers were during:
The Pastry War: November 27, 1838 - March 9, 1839 (France).
The Mexican-American War: April 25, 1846 - February 2, 1848 (United States).
The Second French Intervention: 8 December 1861 - 21 June 1867 (France).
The Tampico Affair: April 9, 1914 (United States).
The occupation of Veracruz: April 21, 1914 (United States).