From Phantoms and Monsters:
The Cadaver Synod is the name commonly given to the posthumous ecclesiastical trial of Catholic Pope Formosus, held in the Basilica of St. John Lateran in Rome during January of 897.
The trial was conducted by Formosus's successor, Pope Stephen (VI) VII. The defendant Formosus, was an elderly pope who after a reign of five years had died April 4, 896 and been buried in St. Peter’s Basilica. Stephen accused Formosus of perjury and of having acceded to the papacy illegally.
The trial began when the disinterred corpse of Formosus was carried into the courtroom. On Stephen VII’s orders the putrescent corpse, which had been lying in its tomb for seven months, had been dressed in full pontifical vestments. The dead body was then propped up in a chair behind which stood a teenage deacon, quaking with fear, whose unenviable responsibility was to defend Formosus by speaking in his behalf.
At the end of the trial, Formosus was pronounced guilty and his papacy retroactively declared null. The Cadaver Synod is remembered as one of the most bizarre episodes in the history of the medieval papacy.