After being reelected in a fiercely contested race in 1871, Juárez died of a major heart attack in July 1872.