Missouri Republicans gave Governor Eric Greitens the benefit of the doubt — but not the benefit of different rules.

Late Tuesday afternoon, Missouri governor Eric Greitens resigned his office. His downfall was long and painful to watch, but in the end, Missouri’s elected Republicans played a crucial role in forcing his hand and holding him accountable.

Just a few years ago, Greitens looked like an almost-ideal political candidate. He’d been a White House Fellow during George W. Bush’s presidency. Democrats tried to recruit him to run for Congress in 2010. After joining the Republican party in 2015 at the age of 41, he swiftly advanced to become the state’s governor, elected in 2016 by a 51–46 margin to replace the outgoing Democratic governor, Jay Nixon. His résumé was stellar and seemed to suggest not only a man of talent and accomplishment but character as well. A Rhodes Scholar and Navy SEAL who rose to lieutenant commander in the Navy Reserve, Iraq and Afghanistan veteran, winner of a Bronze Star and Purple Heart, philosophy Ph.D. from Oxford, bestselling author, university and business-school lecturer on public service and ethics, Greitens had devoted his career before and after his Navy service to charitable and humanitarian causes ranging from Rwandan refugees to America’s veterans.

But Greitens had a dark side that started to come to light in January when he admitted (under pressure from a media exposé) to cheating on his second wife with his hair stylist in 2015 — an affair that appears to have led down a sordid path to alleged sexual assault and battery and “revenge porn” blackmail:

Greitens was first indicted in February on a felony-invasion-of-privacy charge after the husband of his former mistress released a damning audio recording in which the unidentified woman can be heard saying that Greitens bound her hands, removed her clothes, and photographed her before threatening to release the photo if she revealed their relationship. The case was halted when the state abruptly withdrew its charge its earlier this month. After the threat of blackmail, the woman claims Greitens coerced her into performing oral sex. She complied because she “felt that she had no other choice if she were going to get out of the basement,” according to a recently released Missouri House committee report that deemed the woman an “overall credible witness.”

Besides the invasion-of-privacy charge, which may or may not be reinstated (the police have found no evidence of the photo that the woman says he took of her), Greitens was also indicted for computer tampering for allegedly taking donor lists from his charity to use in his gubernatorial campaign; that charge was dropped after he announced his resignation, as part of a deal in which he agreed to step down. As of yet, he has not actually been charged with sexual assault.

As the ugly mess unfolded over the past five months, Missouri Republicans — who hold a greater than two-thirds majority in both houses of the Missouri legislature — faced a choice. They proceeded cautiously, not getting too far ahead of the voters who had elected Greitens, with some issuing calls to avoid haste, give him the benefit of the doubt, and respect the will of the voters. But while Greitens remained truculent in his own defense, most Republicans in the legislature declined to circle the wagons around him. In late February, House speaker Todd Richardson named a panel to conduct an investigation as the first step in impeachment proceedings, selecting as its head Jay Barnes, a term-limited Republican legislator (thus, one with less to fear from the governor). This was actually the second time in as many years that a Republican legislature initiated impeachment proceedings against a Republican governor embroiled in a sex scandal — in April 2017, the delivery of a scathing report by Alabama’s investigative committee triggered the resignation of Governor Robert Bentley to avoid being removed from office.

Greitens had been modestly popular, with polls showing his approval rating at 46–39 in October and 42–41 in early January, but sinking to the mid to low thirties approval with majority disapproval (including in at least one poll where Trump’s approval rating was 50-44) after the scandal broke. A mid-April poll showed voters by a 48–39 margin wanting Greitens to resign, and his approval rating was down to 63 percent among Republicans — a low figure for any politician’s own-party approval, but high enough to suggest why elected Missouri Republicans felt the need to build a legitimate public case before voting to remove him.

Republican calls for Greitens to step down mounted over the past three months; in mid April, the state’s attorney general, Josh Hawley — who is also the party’s candidate in a high-profile Senate race against incumbent Claire McCaskill — issued a blistering statement following the delivery of the Missouri House investigation report:

The House Investigative Committee’s Report contains shocking, substantial, and corroborated evidence of wrongdoing by Governor Greitens. The conduct the Report details is certainly impeachable, in my judgment, and the House is well within its rights to proceed on that front. But the people of Missouri should not be put through that ordeal. Governor Greitens should resign immediately.

At the time, Hawley was among the first Republicans in the state to conclude that Greitens should be impeached. But the process moved forward: Early this month, a special session of the Missouri House was announced to consider impeachment, and the session got underway last week, with more sensational revelations and fights over subpoenas. At the same time, as they were preparing to remove him from office, Republicans were working with Greitens to pass his policy agenda.

The ugly drama in Jefferson City was a grim spectacle to watch. But in the end, the process worked — like Bentley, Greitens had to go, and while his deal with the prosecutor was the final blow, his own party played a key role in pushing him out, to be replaced by a Republican lieutenant governor without the baggage of scandal. (It’s always easier for both parties to take these steps when it doesn’t mean handing a powerful position to the other party).

The ugly drama in Jefferson City was a grim spectacle to watch.

There is, of course, a lesson here for Republicans in Washington and in statehouses across the country. The Missouri GOP didn’t suddenly stop pursuing Republican policies because of the governor’s personal and legal troubles, but neither did they hold a Clinton-style pep rally to resist holding a miscreant leader accountable. They gave Greitens some time and space to rebut or discredit the charges, but moved ahead as it became was clear that they were credible. They didn’t put the ambitions of one man ahead of the party or its causes. And the gradually increasing volume of criticism helped move the voters toward accepting his removal. In short, they gave a fellow Republican the benefit of the doubt, but not the benefit of different rules. That’s how our system is supposed to work.