Rep. Patrick Meehan, R-Pa., is stepping down from Congress after a sexual harassment scandal earlier this year in which he called a former aide a "soul mate."

The Pennsylvania Republican, who had already announced he wouldn't seek re-election in 2018, announced he would resign effective Friday, ending an Ethics Committee investigation into allegations made by a former staffer and triggering another special election in the state this year.

"While I do believe I would be exonerated of any wrongdoing, I also did not want to put my staff through the rigors of an Ethics Committee investigation and believed it was best for them to have a head start on new employment rather than being caught up in an inquiry. And since I have chosen to resign, the inquiry will not become a burden to taxpayers and committee staff," Meehan said in a statement.

Meehan's resignation will trigger a special election to be set by Democratic Gov. Tom Wolf, though that will occur under the current 7th District lines. A court-ordered redistricting changed the swing district in the Philadelphia suburbs to a heavily Democratic new 5th District that Democrats are favored to win in November.

The congressman also said he would repay the $39,000 "severance payment that was made from my office account" within 30 days of his resignation because "I did not want to leave with any question of violating the trust of taxpayers."

When news of the settlement Meehan had reached with a former aide broke earlier this year, the 62-year-old married congressman initially denied the allegations. But days later he took the rare step of talking in very candid terms with multiple media outlets about his relationship with the woman, saying he saw her as a soul mate" and that he had developed a deep "affection" for his much younger aide "in a way in which I was struggling to make sure that I would never put that into our professional relationship."

In an interview with WHYY's Dave Davies, Meehan insisted he "never touched her" beyond hugging and "I never expressed any interest in doing so. I never asked for any kind of a relationship."

"I've been upfront that while we worked together, that there was a growing affection, that I wanted to make sure. ... that I would never cross that line," Meehan said.

However, he admitted that "it was something that, from time to time, I struggled with" and the congressman said he believed the woman had "specifically invited" such communication and fostered their relationship.

Meehan also provided copies of a letter he had written to the woman and text messages they exchanged, showing she was excited to go get ice cream and that she simply wanted to "be the touchstone you need down here," with a winky face emoji.

In his resignation statement, Meehan said he was "deeply grateful to my wife who is so supportive, and who has made many sacrifices in her own career so that I could pursue mine in public service. I am equally thankful for the unwavering support of my children."

"I recognize that there are constituents who are disappointed in the manner in which I handled the situation that lead to my decision not to seek re-election and wish I had done better by them," Meehan also added.

Copyright NPR 2020.