A veteran of the War of the Reform (1858–1860) and the French intervention in Mexico (1862–1867), Díaz rose to the rank of General, leading republican troops against the French-imposed rule of Emperor Maximilian. He subsequently revolted against presidents Benito Juárez and Sebastián Lerdo de Tejada, on the principle of no re-election to the presidency. Díaz succeeded in seizing power, ousting Lerdo in a coup in 1876, with the help of his political supporters, and was elected in 1877. In 1880, he stepped down and his political ally Manuel González was elected president, serving from 1880 to 1884. In 1884 Díaz abandoned the idea of no re-election and held office continuously until 1911.