In this weekly feature, we seek to encourage the local church by remembering the times when things were much, much worse.

Church politics got you down? Sick of your parishioners scheming and backstabbing to nail that sweet Sunday school superintendent position? It could be worse. In fact, it was. In ninth-century Rome, it definitely, definitely was.

We’ve all been there before: You’ve just ascended to the papacy, one of the most powerful positions in the world, but the people still retain reverence for your predecessor. Oh, and also, some other people are trying to murder you and usurp your shiny new papal throne. What’s a ninth-century pontiff to do?

If you’re Pope Stephen VI “Or Possibly VII, We’re Not Sure” of Rome, there’s only one obvious answer here: Dig up your predecessor’s corpse and force it to stand trial for a handful of trumped-up charges.

This may sound crazy (okay, it’s crazy)—but then again, 897 was a ripe year for morbidness. By the time Pope Stephen’s less-than-celebrated shame-fest took place, the Roman Empire had been a memory for 400 years, and the Holy Roman Empire was barely getting started. The only real source of power for anyone looking to control Western Europe was the Catholic Church—assuming, of course, that said individual had any interest in controlling what was, at the time, essentially the world’s armpit.

This might explain why the papacy had become a revolving door of men who would ascend to the head of the church militant, die under mysterious circumstances, and quickly be replaced. If you wanted to cement your papal legitimacy, then, your best bet was to undermine that of the previous guys.

And that’s kinda how we ended up trying a corpse for “ecclesiastical crimes.”

The “Cadaver Synod”—besides being the name for your cousin’s doom metal band—was the term given to that posthumous trial, which occurred when Pope Stephen VI/VII literally disinterred the body of his penultimate predecessor, Pope Formosus (who, due to the office’s constant turnover, was relatively undecomposed), dressed it up in papal garments, and put it on trial for, among other things, “being unworthy of the pontificate.”

As you might imagine, Formosus had very little to say in his own defense; he was quickly convicted of that charge, along with some light perjury. His papacy was declared invalid, and he was stripped of his newly-donned papal garments, relieved of the three fingers he had used for making the sign of the cross, and buried in a commoner’s grave. Then his prosecutors decided that was too good for him, so they dug him up again, tied him to some weights, and tossed him in the Tiber. (The body later washed up and was rumored to be performing miracles—because why not, right?)

Surprisingly, though, things started looking better for Formosus after his “burial.” For some inexplicable reason, the trial turned public opinion against Pope Stephen VI and/or VII, and he was deposed, imprisoned, and strangled to death a few months later. Meanwhile, the later Pope Theodore II convened his own synod that overturned the findings of the Cadaver Synod, and he had Formosus’s now-super-gross remains put back into papal vestments and reburied in St. Peter’s Basilica. Following that, Pope John IX actually convened two separate synods, both of which came to the same conclusion as Theodore’s, and then also banned future trials of dead people, because, in his words, “Seriously, eww, you guys. I can’t even.”

Unfortunately, the former pope’s troubles may not have been quite over. According to at least one historian, Pope Sergius III later dug up, tried, and convicted him yet again, beheading him in punishment—though probably the biggest surprise about that is that Formosus’s head was somehow still attached enough at that point to remove.

So it was and so it shall ever be, as long as Christian leadership positions are wedded to secular influence—but really, as unfortunate as it might be to say it, how could they not be? Sure, it would be nice if your nursery trustee had the pure heart of a servant, but there’s always the chance that she’ll eventually go mad with power and replace that cutesy Noah’s Ark mural with an even cutesier Noah’s Ark mural. Power corrupts, so it’s really only a matter of time before the debate over what color to paint the narthex erupts into the churched-up version of a Game of Thrones-style bloodbath.

Thankfully, though, Scripture isn’t silent on the ridiculous lengths people will go to consolidate their power. As early as the late first century, James the Just was dealing with this exact thing:

What causes quarrels and what causes fights among you? . . . You desire and do not have, so you murder. . . . Do you not know that friendship with the world is enmity with God? . . . God opposes the proud but gives grace to the humble. . .. Resist the devil, and he will flee from you. Draw near to God, and he will draw near to you. Cleanse your hands, you sinners, and purify your hearts, you double-minded.

That’s pretty cut and dried, then: if you wield influence, pray for the strength to resist sin and corruption before somebody ends up dead. And mutilated. And drowned. And beheaded.

After all, next time that could be your corpse getting dressed up for its big day at court.