The First Mexican Empire existed from the September 1821 Declaration of Independence until the emperor's abdication in March 1823. The Provisional Government took power and the First Mexican Republic was proclaimed in 1824. Due to French intervention under Napoleon III, the Second Mexican Empire lasted from 1864 to 1867, when it collapsed and its Emperor, Maximilian I of Mexico, was executed.