Rep. Patrick Meehan, R-Pa., will not seek reelection after he allegedly used taxpayer money to fund a settlement to a former aide who claimed he sexually harassed her.

Meehan wrote in a letter Thursday to his campaign chairman that that he will not run for reelection in Pennsylvania’s 7th congressional district, The Philadelphia Inquirer reported.

“After consultation with my wife Carolyn and with my three sons, and after prayerful reflection, I write to inform you that I will not seek re-election to the United States Congress for the 7th Congressional District in 2018,” Meehan wrote. “Today I communicated the same to the office of Speaker Paul Ryan.”

REP. PATRICK MEEHAN SAYS HE SAW AIDE AS 'SOUL MATE,' BUT DENIES SEXUAL MISCONDUCT

“Unfortunately, recent events concerning my office and the settlement of certain harassment allegations have become a major distraction,” he wrote, according to The Inquirer. “I need to own it because it is my own conduct that fueled the matter.”

Meehan acknowledged Tuesday he told a longtime former aide of his he considered her a “soul mate” and admitted that he acted “selfishly” when she found out she was dating someone else, but said his actions were not considered harassment.

The Republican congressman also acknowledged he lashed out at the aide in his office after he found out about a relationship she was in.

“Sometimes I have the tendency to lash out to others on the staff … and you go hardest on the ones that you care the most about,” Meehan told The Inquirer.

REPUBLICANS WHO WON'T BE COMING BACK TO CONGRESS AFTER 2018 MIDTERM ELECTIONS

The former aide filed a sexual misconduct complaint against Meehan last summer, and he allegedly used thousands of dollars in taxpayer funds to settle the complaint. He referred to the money as a “severance,” rather than a “settlement.”

Ryan called for Meehan’s removal from the House Ethics Committee, and also ordered an investigation into Meehan’s settlement.

Fox News' Mike Emanuel and The Associated Press contributed to this report.