As President of Mexico (1917–20), he played a minor role in the revolution against Porfirio Díaz but a major role in shaping the course of the Mexican Revolution from 1913–1920. A voice for moderation during the violent decade of revolutionary politics, he defeated his rival Pancho Villa and reluctantly accepted the leftist constitution of 1917. Driven from office before his presidential term expired, he was assassinated in the village of Tlaxcalantongo on his way into exile.