(Reuters) - Missouri Governor Eric Greitens on Tuesday said he was resigning, avoiding potential impeachment after he became embroiled in scandals tied to an extramarital affair and his political fundraising.

Greitens called a press conference after an unfavorable ruling earlier in his computer tampering trial related to allegations he illegally obtained a donor list to aid his 2016 election campaign from a veterans’ charity he founded in 2007, according to local media.

“Today I am announcing that I will resign as governor of Missouri, effective Friday,” Greitens told reporters.

“The last few months have been incredibly difficult, for me, for my family, for my team, for my friends and for many, many people that I love,” he said, adding that he had not broken any laws or committed any crimes.

“For the moment let us walk off the battlefield with our heads held high.”

The Republican-controlled Missouri General Assembly on May 18 began a special session to consider what disciplinary steps to take against the first-term Republican governor, including possible impeachment.

Greitens, a 44-year-old former Navy SEAL commando once seen as a rising star in the Republican Party, was previously charged with felony invasion of privacy in connection with an admitted extramarital affair in 2015 with a hairdresser before he was elected. He has said he is innocent and called the relationship consensual.

FILE PHOTO: Missouri Governor Eric Greitens seen at an industrial site in this undated photo from his social media site made available May 30, 2017. Office of the Missouri Governor/Handout via REUTERS

St. Louis prosecutors dropped the felony charge before Greitens’ trial got underway but have said they would refile the case.

Greitens was accused of taking a photo of his lover in a state of undress without her consent and making it accessible by computer to use as retaliation should she divulge their relationship. He has denied threatening to blackmail her and his attorneys noted the alleged photograph has never been produced.

Greitens had previously called the charges against him part of a political witch hunt and on Tuesday he complained of “legal harassment” with “no end in sight.” No Missouri governor has ever been impeached.

Lieutenant Governor Mike Parson, also a Republican, will take over as the state’s top politician.

Republican leaders in the state House of Representatives said Greitens’ exit was best for the state.

“We believe the governor has put the best interest of Missourians first today by choosing to resign,” House Speaker Todd Richardson, Speaker Pro Tem Elijah Haahr and Majority Floor Leader Rob Vescovo said in a statement.

State Senate Democratic leader Gina Walsh said Greitens still needed to answer for the scandals, however.

“Innocent people don’t resign and criminals don’t get let off the hook simply because they cut and run,” she said in a statement. “Missourians deserve to know what laws were broken, what lies were told, and how deep the corruption went.”

Greitens’ announcement came after damaging testimony by a former campaign aide to a House committee investigating the governor. It also followed a separate ruling by a judge forcing the governor’s campaign, and a so-called dark-money group affiliated with Greitens, to reveal fundraising information, the St. Louis Post Dispatch reported.

The Circuit Attorney for the City of St. Louis said in a statement after Greitens’ announcement that it had reached a deal on the computer tampering charge but would not disclose the details until Wednesday.