a new Constitution was drafted in 1857 that established a secular state, federalism as the form of government, and several freedoms. As the conservadores refused to recognize it, the Reform War began in 1858, during which both groups had their own governments. The war ended in 1861 with victory by the Liberals, led by Amerindian President Benito Juárez. In the 1860s Mexico underwent a military occupation by France, which established the Second Mexican Empire under the rule of Habsburg Archduke Ferdinand Maximilian of Austria with support from the Roman Catholic clergy and the conservadores, who later switched sides and joined the liberales. Maximilian surrendered, was tried on June 14 and was executed on June 19, 1867.
Porfirio Díaz, a republican general during the French intervention, ruled Mexico from 1876 to 1880 and then from 1884 to 1911 in five consecutive reelections, period known as the Porfiriato, characterized by remarkable economic achievements, investments in the arts and sciences, but also of economic inequality and political repression.
A likely electoral fraud that led to Diaz's fifth reelection sparked the 1910 Mexican Revolution, initially led by Francisco I. Madero. Díaz resigned in 1911 and Madero was elected president but overthrown and murdered in a coup d'état two years later directed by conservative general Victoriano Huerta. That event re-ignited the civil war, involving figures such as Francisco Villa and Emiliano Zapata, who formed their own forces. A third force, the constitutional army led by Venustiano Carranza, managed to bring an end to the war, and radically amended the 1857 Constitution to include many of the social premises and demands of the revolutionaries into what was eventually called the 1917 Constitution. It is estimated that the war killed 900,000 of the 1910 population of 15 million. Assassinated in 1920, Carranza was succeeded by another