Pope Formosus (born around 816, died April 4, 896), only served for 5 years in the office of Pope, and they were troubled years. Formosus inherited an unstable political situation, and took the wrong side in the dispute between warring kings in a disintegrating Christendom.
In 894, he asked King Arnulf of the Franks to defend Rome against various attackers, but chiefly against the machinations of Duke Guido of Spoleto. That worked fine for a while, but eventually both Arnulf and Formosus died, leaving Guido’s son Lambert as the Holy Roman Emperor, and a new Pope, Stephen VI, in charge of the church. Apparently to prove his loyalty to Lambert of Spoleto, Pope Stephen VI had the dead body of Formosus dug up, dressed in papal robes, and put on trial. Formosus didn’t do a very good job defending himself (though he did apparently reserve the right to remain silent). He was found guilty of disloyalty and of grasping for ecclesial power, and he was severely punished: Three of his fingers were broken off, and his body was thrown into the Tiber.
But what comes around goes around, and in the succession of Popes, Formosus was vindicated by subsequent investigations. It wasn’t long before another Pope even declared that putting dead men on trial was unacceptable. As for Formosus, even people who disagreed with him began to sympathize with him as soon as his corpse went on trial and received the gruesome punishment of being thrown into the river. People downstream claimed his body washed up on the shore and caused miracles to happen. Public opinion shifted. Somebody took care of the poor corpse, and it received a decent second burial.