A special congressional election to fill Pennsylvania’s vacant congressional seat in the state’s 18th District ended without a declared victor on Tuesday.

Democrat Conor Lamb emerged narrowly ahead of State Rep. Rick Saccone with 99 percent of precincts reporting. But Lamb’s margin fell well within the 0.5 percentage point range to potentially trigger a recount, which can be declared under state law if any three voters in a precinct, or the candidate, request one.

By early Wednesday morning, Lamb had about a 600-vote lead, less than the total number of votes for Libertarian candidate Drew Miller. But that margin could narrow with some absentee ballots still to be counted.

Still, the candidate declared victory late last night at his election party. “It took a little longer than we thought, but we did it!,” Lamb told the crowd.

The race was so close that the Associated Press chose not to declare a winner on Tuesday night.

The fact that the race was this close in the first place, however, was a colossal achievement for Lamb and a huge embarrassment for the Republican Party. President Trump won the district by almost 20 points in 2016, and GOP groups pumped in more than $10 million to help Saccone win.

The triggering of a recount would mean that more time and effort will go into a district that will cease to exist later in the year. The state’s Supreme Court ruled that the state’s districts needed to be redrawn because of unconstitutional gerrymandering. And the new map would dissolve the district as it currently stands.

Two visits from the president, one from the vice president, one from Ivanka Trump, one from Donald Trump Jr., and another from White House counselor to the president Kellyanne Conway were not enough to lift Saccone to victory on Tuesday night—though one may come in the recount.

Publicly and privately, Republican officials began to cast doubts on Saccone’s chances as the election grew near, even trying to spin Lamb’s narrow lead as a moral victory for the GOP late on Tuesday night. Sensing that a loss was on the way, they tried to save face by saying Lamb was essentially running as a Republican and that the race wouldn’t have ramifications for the upcoming midterms. But the amount of money spent to save the seat shows how much the GOP valued the contest as even a symbolic victory.

Republican National Committee Chairwoman Ronna McDaniel said in an interview on Fox News on Monday that this was a unique election and wouldn’t portend negative results for the party later this year.

“Conor Lamb is distancing himself from a very unpopular Nancy Pelosi, a millionaire from San Francisco who has nothing to do with the values of Pennsylvania,” McDaniel said, doing some expectation-setting.

Saccone, meanwhile, was trying to cast himself as the underdog in the race and closed with a message saying his opponents have a “hatred for God.”

But none of the labeling seemed to stick on Lamb, who had high favorability among the district’s voters in the most recent public poll of the contest. His emphasis on new leadership, lack of a previous voting record, and flexibility on working with the president made it next to impossible for any branding from the Republican party to work.

Lamb was also bolstered by a surge in turnout from the district’s union households and the more affluent Pittsburgh suburbs.

Darrin Kelly, the president of the Allegheny County Labor Council, AFL-CIO, said it had mobilized more than 150 people in the field and reached some 45,000 voters in an extensive ground campaign.

“He has never wavered from his commitment to the working families,” Kelly said of Lamb. “He never wavered on who he was or who he is. You stick by people like that to the end.”

Tim Waters, the director of the United Steelworkers Political Action Committee, told The Daily Beast on Monday that the committee had hoped its canvassers would surpass 20,000 voter contacts at their doors by the time people headed to the polls.

“This is not a fair fight,” Waters told The Daily Beast. “The way this district was drawn, it was drawn to keep [Rep.] Tim Murphy in for the rest of his life.”

While Republican outside groups and leaders like McDaniel attempted to tie Lamb to the national Democratic Party and specifically House Minority Leader Nancy Pelosi (D-CA), he ran a campaign primarily avoiding the pitfalls that come with nationalizing a race in a red district. Much of Lamb’s rhetoric on the stump was devoted to protecting Social Security and Medicare as opposed to more hot-button social issues that could have proved fatal in the conservative southwestern Pennsylvania district.

Lamb’s enormous fundraising haul allowed him to match Saccone on the air and gave him the opportunity to introduce himself to voters on his own terms, challenging the narrative that had been created about him from GOP groups. His early support for labor, combined with Saccone’s backing of right-to-work legislation, earned Lamb plaudits from union households who organized in great numbers to push him over the line.

The candidate shied away from associations with national Democrats but got a boost from a few high-profile surrogates in recent weeks, including former vice president Joe Biden, who campaigned on Lamb’s behalf as the election drew nearer.

Lamb would only serve this particular district until November, at which point he’d be running for reelection in a newly drawn district that is slightly more favorable to Democrats.

Even so, some Republicans said such a victory would portend a tough November for the party.

“Sometimes the best run campaigns cannot overcome an overwhelming political storm or a wave,” retiring Rep. Charlie Dent (R-PA), told The Daily Beast. He said that in more moderate districts where the president may in fact be a liability, Republicans are going to have to carve out their own identities.

“My advice to our candidates is to develop your own brand,” Dent said, describing a Lamb win as “quite an earthquake.” “You’re going to be pretty much on your own.”

Rep. Seth Moulton (D-MA), who raised money for Lamb and went door-to-door with the candidate the weekend before the election, told The Daily Beast that he wouldn't be surprised if this likely victory led more Republicans to consider retirement.

But he cautioned that the party can't wait for Republicans to bow out or count on the fact that they will under-perform.

“One of the things that I keep reminding people is that we’re not going to win by counting on Republicans to fail," Moulton said. "We’ve got to stand for something and not just against Trump and the Republicans. That’s not enough for Democrats to win.”