Prosecutors agreed to drop one of two felony criminal cases against Missouri Gov. Eric Greitens after the governor's attorneys said he would resign if the allegations were dismissed, a spokeswoman for St. Louis' top prosecutor said Wednesday.

Prosecutors agreed to drop one of two felony criminal cases against Missouri Gov. Eric Greitens after the governor's attorneys said he would resign if the allegations were dismissed, a spokeswoman for St. Louis' top prosecutor said Wednesday.

A day after Greitens announced that he would step down, St. Louis Circuit Attorney Kim Gardner said her office decided to dismiss a charge of computer data tampering following conversations with the defense team for the governor, who was once a rising star in the Republican Party.

"I remain confident we have the evidence required to pursue charges against Mr. Greitens, but sometimes pursuing charges is not the right thing to do for our city or our state," said Gardner, a Democrat.

A spokeswoman for Gardner's office, Susan Ryan, said the defense approached prosecutors with an offer to resign if the case were dropped. Prosecutors agreed.

Defense attorney Jim Martin acknowledged reaching out to Gardner to resolve the issue but added, "I don't think that's exactly the full play." He did not elaborate.

The charge, filed in April after an investigation by the Missouri attorney general's office, accused Greitens of using a donor list from the veterans charity he founded, The Mission Continues, for his 2016 gubernatorial campaign.

Responding to Greitens' past statements calling the prosecution "a witch hunt" that inflicted pain on his family, Gardener said the governor had brought the charges upon himself "by his actions, his statements, his decisions, his ambition and his pursuit for power."

Many of Greitens' former colleagues and friends "cooperated with our prosecution, not because they were threatened or harassed, but because it was the right thing to do," she said.

Had the governor been convicted, she said, it was unlikely that he would be sentenced to prison, given the type of charge he faced and the fact that he would be a first-time offender.

A St. Louis judge approved the agreement, which has seven stipulations, two of which are sealed and unavailable to the public. One of the open stipulations states that Greitens has agreed to release Gardner and everyone in her office from civil liability.

The governor also was indicted on invasion-of-privacy charges in February in St. Louis for allegedly taking an unauthorized and compromising photo of a woman during an extramarital affair in 2015, before he was elected. The charge was dropped earlier this month, but a special prosecutor is considering whether to refile it.

The special prosecutor, Jean Peters Baker, said Tuesday that no deals have been made by her office with Greitens' attorneys.

Martin said he expected the remaining charge to be resolved soon, but he offered no details.

"I think what folks need to know is it's now time to leave the governor alone and let him and his family heal," Martin said.

Greitens' departure becomes official at 5 p.m. Friday, marking a stunning political defeat for the 44-year-old, self-made warrior-philosopher who had aspirations of someday becoming president.

For those fellow Republicans who had strenuously urged his resignation, Greitens' exit provides the divided party a chance to reunify at the start of a summer campaign season that will include intense efforts to unseat Democratic U.S. Sen. Claire McCaskill.

The resignation also allows Greitens to avoid the distinction of becoming the first Missouri governor to be impeached. A House investigatory committee had subpoenaed Greitens to testify next Monday during a special monthlong session focused solely on his potential discipline.

Fellow Republican Lt. Gov. Mike Parson — a former state lawmaker and sheriff — is to serve the remainder of Greitens' term, which runs until January 2021.

Greitens could face other investigations. The chairman of the House investigatory committee and an attorney representing the woman's ex-husband both have said they have shared information with FBI agents looking into the governor.

A complaint also remains pending at the Missouri Ethics Commission alleging Greitens filed a false campaign report last year about the source of the charity donor list.

Also Wednesday, a county judge ordered attorneys to preserve data from phones targeted in an investigation into a text-deleting phone app used by Greitens and some of his staff.

Circuit Judge Jon Beetem ordered Robert Thompson, who is representing Greitens' office, to compile a list of those who used the Confide app, along with the telephone numbers they used.

Attorney Mark Pedroli filed a lawsuit contending Greitens and his top staff violated the state's open records laws by using the app.

Greitens is a married father of two young sons who traveled the world on humanitarian missions before joining the Navy. After being wounded in Iraq, he founded a veterans' charity and became a best-selling author and motivational speaker.

He campaigned as a political outsider in 2016, winning an expensive Republican gubernatorial primary and then defeating Democratic Attorney General Chris Koster in the general election to give Missouri Republicans control of the governor's mansion for the first time in eight years.

The Rhodes scholar with a doctoral degree in politics had a sometimes rocky relationship with the GOP-controlled Legislature, once comparing them to third-graders and frequently denouncing them as "career politicians."

His support in the Capitol began to unravel after the night of Jan. 10, when a St. Louis TV station aired a report featuring an audio recording secretly made by a woman's ex-husband. In that, the woman describes how Greitens allegedly bound her hands, blindfolded her and took a compromising photo while threatening that he would distribute it if she ever spoke of their encounter. Greitens denied threatening blackmail, but hasn't directly answered questions about whether he took the photo.