WASHINGTON — Rita Hart, a Democrat who ran for Congress in 2020 in southeastern Iowa and lost by just six votes, withdrew her petition on Wednesday to have the House overturn the election results, ending a bitter dispute that had threatened to become a political liability for her celebration.

The conclusion cemented Representative Mariannette Miller-Meeks, a Republican physician, as the winner of one of the nearest House contests in American history. Additionally, it spared Democratic leaders from having to weigh in on whether to throw out the consequences of a contested vote months following President Donald J. Trump’s false claims of a stolen election fueled a partisan conflict and a deadly riot in the Capitol.

Republicans had signaled that they were ready to turn the dispute into a political cudgel against the vast majority party, and some vulnerable Democrats who had come under attack on the matter in their districts were deeply uncomfortable with the possibility of intervening.

In a statement on Wednesday, Ms. Hart repeated her claim that voters were “silenced” but acknowledged that the contest had become politically contentious.

Despite our best efforts to have every vote counted, the reality is that the toxic campaign of political disinformation to assault this constitutional review of the closest congressional contest in 100 years has effectively silenced the voices of Iowans, she said. “ It is a stain on our democracy that the fact has not prevailed, and my hope for the future is a return to decency and civility. ”

Ms. Hart’s effort had identified 22 ballots that they believed were throw but “wrongfully” uncounted by state election officials during a districtwide recount in the fall. Rather than taking her case to court in Iowa prior to the election was certified, Ms. Hart chose to wait and appeal the results to the House Administration Committee, invoking a 1960s law.

With Democrats in control of the room, they would have run the inspection and had the power to dictate their own recount and a vote by the full House on whether to unseat Ms. Miller-Meeks in favor of their own candidate, which could have added to their eight-seat majority.

Im deeply appreciative that were finishing this now, Ms. Miller-Meeks said in a recorded announcement on Wednesday evening. “It’s time to move forward, to unite as one group of people supporting Iowa’s Second Congressional District. ”

Democratic leaders had argued that they had been not able to take the appeal seriously, but Republicans mobilized, accusing them of hypocrisy and attempting to steal an election that had been confirmed by state officials. To drive home the point, Representative Kevin McCarthy of California, the Republican leader, flew to Iowa on Wednesday before Ms. Hart’s announcement to rail against what he called an attempted political power grab intended to pad Democrats’ margin of management.

Iowans made a decision, Mr. McCarthy said. “ And it’s their voice, and they have a right to have Congresswoman Mariannette Miller-Meeks, who they elected, to continue to serve them. ”

The dispute was a particularly tricky issue for politically vulnerable House Democrats, who have become targets of a coordinated pressure campaign on the matter. Republicans’ campaign arm found that the issue polled overwhelmingly favorably for them in the competitive districts they aspire to reverse in 2022.

The National Republican Congressional Committee specifically targeted Representative Cindy Axne, Democrat of Iowa, releasing radio ads in her district accusing her of being complicit in an attempt to overturn the will of the nation ’s voters.

An affiliated political action committee, American Action Network, announced last week that it would “ spend mid-five figures on telephone calls” in swing districts held by Democrats urging voters to oppose Ms. Hart’s attempts.