Bustamante turned over the presidency to Melchor Múzquiz on 14 August 1832 and left the capital to fight the rebels. He defeated them on 14 August at Gallinero, Dolores Hidalgo, Guanajuato, and then returned to fight Santa Anna, who was nearing Puebla. After two more battles, the three candidates, Bustamante, Santa Anna, and Gómez Pedraza, signed the Convenios de Zavaleta (Agreements of Zavaleta)(21–23 December), by which Gómez Pedraza was to assume the presidency and hold new elections. Bustamante was to go into exile, which he did in 1833.