Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

HARRISBURG, Pa. — A Republican congressman from Pennsylvania who settled a former aide's sexual harassment complaint with taxpayer money told Republican House Speaker Paul Ryan on Thursday that he will not seek re-election, according to a spokesman for Ryan.

The complaint by a former aide three decades younger than U.S. Rep. Pat Meehan came to light Jan. 20 in a New York Times report, citing unnamed people. The accuser's lawyer, Alexis Ronickher, called the allegations "well-grounded" and a "serious sexual harassment claim."

Meehan, 62, is a four-term congressman and former U.S. attorney in Philadelphia. The married father of three had described the woman in an interview as a "soul mate," and acknowledged that he had lashed out when he discovered she had begun dating another man. But he contended he had done nothing wrong and had never sought a romantic relationship with her.

Rep. Patrick Meehan, R-Pa., leaves a meeting of the House Republican Conference in the Capitol on June 7, 2017. Tom Williams / CQ Roll Call via AP Images file

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The Times report spurred Ryan to call for an Ethics Committee investigation and Meehan's removal from the committee. Ryan also told Meehan to repay the money and the Ethics Committee opened an investigation into whether Meehan sexually harassed the woman and misused official resources.

Meehan is the fifth member of Congress to resign or say he won't run again amid a national reckoning over sexual misconduct in the workplace.

The former aide made the complaint last summer to the congressional Office of Compliance after Meehan became hostile toward her when she did not reciprocate his romantic interest in her, and she left the job, the Times reported.

Related: House unveils landmark sexual harassment overhaul bill

The settlement had been kept secret, and Meehan refused to say how much taxpayer money he paid as part of the agreement. Meehan said he followed the advice of House lawyers and Ethics Committee guidance in agreeing to the payment.

He said he had developed strong feelings for the woman in the seven years she had worked for him, and that he reacted badly when he discovered that she had a romantic interest in another man.

He told reporters that while he had struggled with his feelings, he also insisted that he had kept their relationship professional. Meehan represents a closely divided district in moderate southeastern Pennsylvania that has been criticized as being among the nation's most gerrymandered districts.

Initially, Meehan had said he would run for a fifth term. But even after he aired his side of the story, Republicans quietly looked for other candidates, believing that Meehan could not regain voter confidence after he had used taxpayer money to settle the case.

The badly contorted district — drawn by Republicans before the 2012 election in a bid to help Meehan win re-election — is a huge liability for Republicans and could change dramatically in a court-ordered redrawing of Pennsylvania's congressional boundaries.

Democrat Hillary Clinton narrowly won the district in the 2016 presidential election, and winning it likely becomes an even bigger target for Democrats riding an anti-Trump wave in Philadelphia's suburbs.