Facing an ethics probe over allegations of sexual harassment, Republican Rep. Patrick Meehan announced earlier this year that he would not run for re-election in Pennsylvania this fall. On Friday, Meehan made his resignation from Congress effective immediately, a decision that spares him from a potentially embarrassing investigation by the House Ethics Committee.

Meehan also pledged to pay back the $39,000 he used from his office account to settle the claim against him. The 62-year-old, married, father of three used that cash to settle a claim brought by a former aide decades his junior who accused Meehan last summer of making unwanted romantic advances toward her. The aide said Meehan became hostile when she did not reciprocate. After those details became public in January, Meehan was removed from the Ethics Committee, where he had helped investigate other sexual misconduct claims against his colleagues, and days later he announced his plan to retire at the end of the term, even as he claimed his former aide “specifically invited” his intimate communications, which included a letter professing his affection.

“I have decided that stepping down now is in the interest of the constituents I have been honored to serve,” Meehan said in a statement. “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’s immediate resignation will short-circuit the ethics probe, which was looking into both his alleged harassment, and his use of taxpayer money to make them go away, in a workplace that is among the toughest to report sexual harassment. But it will create a different set of problems for his home state.

As my colleague Jim Newell explained last week when Meehan’s fellow Pennsylvania Republican, Rep. Charlie Dent, decided to resign before the end of his current term, state law dictates that Meehan’s seat cannot simply be left open for the remainder of the year. Gov. Tom Wolf, a Democrat, will have 10 days to schedule the special election, which will then occur at least 60 days later. That means the winner of the special election will serve, at most, roughly six months in office, the majority of which will be consumed by election-year politicking followed by a lame-duck session.

The most obvious solution would be for Wolf to schedule the special election on the same day as the rest of the midterms in November. But thanks to Pennsylvania’s redrawn congressional map, which will go into effect next year, concurrent elections would create their own set of problems. Anyone running in the special election who wants to serve more than two months would also have to win a second congressional election that same day in a different district, since Dent’s will no longer exist in its current form. That’s a lot of work—and a lot of money—for what would be only a slight seniority edge over other incoming lawmakers.