Missouri Gov. Eric Greitens did the right thing resigning this week. It was painfully obvious he could no longer lead given his mounting legal challenges.

His administration in flames, it was in the best interest of his family, his party and the state that he step down.

The writing was on the wall. It took Greitens a while to see that writing, but eventually it became clear to the former Navy SEAL who was fond of military metaphors, that surrender was his best option.

Ultimately, he cut a deal to resign in exchange for the St. Louis prosecuting attorney’s office dismissing a felony computer-tampering charge. Other criminal charges involving campaign irregularities still loom. The Greitens legal saga isn’t over.

Had Greitens elected to remain in office, he likely would have been impeached. The Legislature was hungry to devour a governor who treated them with contempt. Even though it took him a while to figure it out, he was wise to avoid this outcome.

But Greitens won’t be able to avoid going down in history as one of the state’s biggest political disappointments. He will be remembered not as the transformational leader he portrayed himself as but rather as a political poser, a fraud.

He vaulted into office pledging to drain the swamp in Jefferson City. He left office personifying the swamp as a cadre of lawyers, lobbyists and political insiders attempted to rescue him.

In office just 16 months, Greitens managed to cement a reputation as the most secretive governor in Missouri history. He rose to power leveraging millions of dollars of dark money.

No doubt much of that money came from Missouri corporations and interests. But it’s also likely a good chunk of it came from out-of-state interests looking to invest in a candidate with designs on the White House.

Regardless, it didn’t seem to square with a candidate who was touting the need to clean up government. It wasn’t long before Greitens was cited for an ethics violation and required to pay a small fine for the violation.

Greitens cultivated a national profile and flaunted his Navy SEAL credentials in a way that was off-putting to many. He brought in a team of outsiders to run his campaign and built a staff comprised of many people from out of state. There is nothing wrong with that but it rubbed many the wrong way.

In the end, Greitens will be a footnote in Missouri history. He will be remembered as someone who squandered an opportunity to transform state government and who was forced to resign as part of a deal with prosecutors to avoid criminal charges.

His legacy in state government will be one of failed leadership and empty platitudes. As others have observed, a leader is one who knows the way, goes the way and shows the way.

Greitens failed on all accounts.