Republican Troy Balderson, a state senator in Ohio who ran for Congress, has officially been declared the winner in a deadlocked special election for Ohio’s 12th district.

Balderson had a slight leader over Democrat Danny O’Connor for weeks but was finally certified the winner Friday after every provisional and absentee ballot was counted, the Associated Press reports. The final margin of victory was 1,680 votes, or 0.8 percent of the total, which falls just a few hundred votes outside the margin that would trigger an automatic recount.

"Danny O’Connor ran a hard-fought race," Balderson said, "but I look forward to earning the support of voters for a fourth time in November as I share my track record of getting things done for Ohioans."

O’Connor will take another shot at Balderson in November, when the two will face off in a second election to determine who will serve a full two-year term.

Balderson retains for Republicans the House seat most recently held by former Rep. Pat Tiberi, who retired in January. Both President Donald Trump and Ohio Gov. John Kasich (R.) endorsed Balderson, demonstrating his effort to be a unifying candidate for Republicans.

Kasich, who previously represented the 12th district, has been a prominent critic of the president. He nevertheless supported Balderson’s attempt to keep his old seat in GOP hands, and the congressman-elect has walked a fine line between the different party factions.

O’Connor, meanwhile, flipped this week on who he supports for the Democratic House leadership. After previously saying he would vote for any potential Democratic leader in the House, he said Friday he would not support current Minority Leader Nancy Pelosi (D., Calif.).

Trump visited the state to support Balderson just before the Aug. 7 special election. He argued Republicans should not accept that the president’s party will–as it often does–lose seats in midterm elections, saying "it could be a red wave" in November.