Díaz launched his rebellion in Ojitlan, Oaxaca, on 10 January 1876 under the Plan of Tuxtepec, which initially failed. Díaz fled to the United States. Lerdo was re-elected in July 1876 and his constitutional government was recognized by the United States. Díaz returned to Mexico and fought the Battle of Tecoac, where he defeated Lerdo's forces in what turned out to be the last battle (on 16 November). In November 1876, Díaz occupied Mexico City, and Lerdo left Mexico for exile in New York. Díaz did not take formal control of the presidency until the beginning of 1877, putting in General Juan N. Méndez as provisional president, followed by new presidential elections in 1877 that gave Díaz the presidency. Ironically, one of his government's first amendments to the liberal 1857 constitution was to prevent re-election.