 Juárez remained in office until his death in 1872.In 1867 with the defeat of the monarchy and execution of Emperor Maximilian, the republic was restored and Juárez reelected.He continued to implement his reforms.