JEFFERSON CITY, Mo. (AP) — One of two criminal cases against Missouri Gov Eric Greitens will be dismissed, now that the Republican governor has announced his resignation, St. Louis’ top prosecutor said Wednesday.

St. Louis Circuit Attorney Kim Gardner announced that her office has reached a deal to dismiss a felony charge of computer data tampering. A day earlier, Greitens made the stunning announcement that he would step down from office effective Friday, citing “legal harassment.”

“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,” Gardner said.

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

Greitens also was indicted on felony invasion of privacy 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 Jackson County prosecutor Jean Peters Baker was appointed special prosecutor to consider whether to refile it.

Baker said in a statement Tuesday that the investigation is ongoing and will continue “until our work on the case is completed.” She said no deals have been made by her office with Greitens’ attorneys.

Greitens, a former Navy SEAL officer, suggested less than two weeks ago that he would never quit fighting the allegations against him, even as the Legislature met in special session to consider impeachment.

So it was stunning when he announced he was quitting with his mission incomplete.

“The time has come, though, to tend to those who have been wounded and to care for those who need us most,” said Greitens, his voice cracking while his team members struggled to hold back tears. “So for the moment, let us walk off the battlefield with our heads held high.”

Greitens’ departure will become 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 in which it’s seeking to unseat Democratic U.S. Sen. Claire McCaskill.

Greitens’ resignation also allows him to avoid the potentially dubious distinction of becoming the first Missouri governor ever 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.

On May 17, Greitens suggested to a crowd of supporters gathered for an agricultural event that he wouldn’t give up.

“No matter what they throw at me, no matter how painful they try to make it, no matter how much suffering they want to put me and my family through and my team through ... we are going to step forward day after day after day, and we are going to continue in our mission to fight for the people of Missouri,” Greitens said then.

On Tuesday, Greitens remained defiant even while resigning.

“I am not perfect. But I have not broken any laws or committed any offense worthy of this treatment,” he said. “I will let the fairness of this process be judged by history.”

Greitens is a married father of two young sons. He is a Rhodes scholar with a doctoral degree in politics 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.

Greitens had a sometimes rocky relationship with the GOP-controlled Legislature as he pushed his agenda, once comparing them to third-graders and frequently denouncing them as “career politicians.”

His support in the Capitol unraveled further 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.

A St. Louis grand jury indicted Greitens on Feb. 22 on one felony count of invasion of privacy related to the alleged photo. That prompted the Missouri House to form a special investigatory committee.

In April, the legislative panel released a report containing graphic testimony in which the woman said Greitens had restrained, slapped, shoved and belittled her during a series of sexual encounters that at times left her crying and afraid. Greitens denied any violence and said the allegations amounted to a “political witch hunt.” He vowed to stay in office.

But Greitens’ troubles deepened in the ensuing weeks when Republican Attorney General Josh Hawley — who is running for McCaskill’s seat — referred evidence to the St. Louis prosecutor leading to the felony charge alleging misuse of the charity donor list.

A May 2 House committee report indicated that Greitens himself received the donor list while CEO of the charity and later directed political aides to work off it. Shortly before Greitens resigned Tuesday, the House panel heard a second round of testimony from former aide Michael Hafner about the charity donor list and other efforts by Greitens’ campaign to conceal the original source of some political donations.

Earlier Tuesday, a judge also ruled that a secretive pro-Greitens nonprofit group called A New Missouri must comply with a legislative subpoena for any documents or communications showing potential coordination between the organization, Greitens and his campaign committee. The subpoena also sought receipts, content and communications by A New Missouri related to media advertising.

The judge said the identities of donors to A New Missouri — which don’t have to be publicly disclosed because it is a 501c4 organization — could be redacted from the documents.

The legislative panel also had subpoenaed other Greitens’ campaign aides.

———

Associated Press writers Summer Ballentine and Blake Nelson in Jefferson City, John Hanna in Topeka, Kansas, Lisa Mascaro in Washington and Steve Peoples in New York City contributed to this report.

———

Follow David A. Lieb on Twitter: https://twitter.com/DavidALieb

———

Sign up for “Politics in Focus,” a weekly newsletter showcasing the AP’s best political reporting from around the country leading up to the midterm elections: https://bit.ly/2ICEr3D