A deadlocked House special election in Pennsylvania's Trump country was too close to call early Wednesday, according to NBC News.

As votes filtered in for Tuesday's 18th District race between Democrat Conor Lamb and Republican Rick Saccone, neither candidate emerged with a clear advantage. With nearly all the votes counted, Lamb held a slim edge, with less than 1 percentage point separating the candidates in a district President Donald Trump won by about 20 percentage points in 2016.

Lamb declared victory early Wednesday morning, but the Saccone campaign told NBC News that it would not concede tonight.

The election's outcome may not be decided until Wednesday morning, at the earliest.

Ahead of this year's midterm elections, the parties vie for at least a moral victory in Pennsylvania. A Democratic win could signal trouble for the GOP in other red pockets of the country. A Republican victory may give the GOP hope that it can limit the gains Democrats can make in November's House elections.

Regardless of the final outcome, the race fits a pattern of Democrats outperforming 2016 results in House special elections since Trump took office.

While all the votes were not counted and media outlets had not called the race, Lamb effectively declared victory in remarks to supporters early Wednesday.

"It took a little longer than we thought, but we did it," the 33-year-old former prosecutor and U.S. Marine veteran said.

House Democrats' campaign arm also claimed a win Tuesday night, issuing a statement praising Lamb for coming out on top. Democratic Congressional Campaign Committee Chairman Rep. Ben Ray Lujan, D-N.M., congratulated Lamb on what he called an "incredible victory."

"These results should terrify Republicans. Despite their home field advantage and the millions of dollars outside groups poured into this race, Republicans found that their attacks against Conor, including their unpopular tax scam, were not believable," he said.

The National Republican Congressional Committee pushed back against the Democrats' declaration of victory.

"The race is too close to call and we're ready to ensure that every legal vote is counted," the group said in a statement. "Once they are, we're confident Rick Saccone will be the newest Republican member of Congress."

The election's result could affect midterm candidate and recruitment on both sides of the aisle. Pro-GOP groups poured more than $10 million into the race to avoid a loss that may shake up November's battle for control of Congress. Outside groups aimed to boost Saccone as Lamb's campaign raised more than 4 times more money than his.

Pennsylvania's soon-to-change congressional map makes the longer-term effect of the election less clear. Because the state's districts will change, the winner could only represent the district he won for a few months.

If he runs again in November, Lamb would have to challenge Rep. Keith Rothfus, R-Pa., in the new 17th District. Saccone would have to run for election in a revised 14th District.

The Pennsylvania district opened up when Rep. Tim Murphy, R-Pa., resigned last year under a cloud of scandal. Murphy won every election there from 2002 to 2016, and no Democrats even challenged him in his last two victories.