1861-1863: Benito Juárez, from 1863-1867 in opposition to the emperor
1863-1864: Juan Nepomuceno Almonte
From 1864 to 1867 most of Mexico was ruled by Maximilian of Habsburg, emperor imposed by Napoleon III of France. During this time Benito Juárez continued a government in the north of the country, which some nations recognized as the legitimate government of Mexico.