On the eve of the 1910 Revolution against the long-established Díaz regime, Huerta was teaching mathematics in Mexico City. He applied successfully to rejoin the army with his former rank and was accepted. He did not play a major role in the early stages of the Revolution that led to the resignation of Díaz, although he commanded the military escort that gave Díaz safe conduct into exile in May 1911. During the interim presidency of Francisco León de la Barra following the resignation of Díaz and the election of Francisco I. Madero in November 1911, General Huerta carried out a campaign in Morelos, attempting to crush the rebellion led by Emilio Zapata. Huerta's forces burned villages supporting the rebellion and attacked their residents. These actions frustrated Madero's later attempts to placate those rebels. Huerta had a record of opposing revolutionaries and intrigues with Madero's enemies. Huerta's actions in Morelos forced a break between Emiliano Zapata and Madero, who was later to rebel against Madero immediately after his November 1911 election.