GTY 931664086 A POL ELE ELN USA PA
Supporters respond to early results at an election night event for Republican Pennsylvania congressional candidate Rick Saccone as the polls close on March 13, 2018, at the Youghiogheny Country Club in Elizabeth Township, Pa.
Jeff Swensen, Getty Images

WASHINGTON — In a Pennsylvania congressional district President Trump won by 20 points just over a year ago, the race to replace Rep. Tim Murphy — who resigned last fall over a sex scandal — was too close to call with 99% of precincts reporting. Results Wednesday morning had Democrat Conor Lamb ahead by less than 700 votes.

"It took a little longer than we thought, but we did it," Lamb told supporters early Wednesday. Democratic outside groups also claimed victory, but no major news outlets had called the race.

Republican Rick Saccone took a defensive stance, telling his backers: "We’re still fighting the fight. It’s not over yet. We’re going to fight all the way into the end. You know I never give up." 

"This is not going to be decided tonight," Adam Bonin, a Pennsylvania-based lawyer who specializes in political law, told USA TODAY late Tuesday. "It’s unusual for a race with this many votes in it to be this close, but it happens."

"Unofficial counts like these tend to hold up but it’s when the election boards sit down and calmly go machine by machine to calmly check their arithmetic" that the race will actually be certified, Bonin said. He added that in a race this close it may remain open until next Tuesday when military and overseas ballots are counted. 

County election officials vowed to stay into the early hours of Wednesday morning, rather than go the traditional route and wait until the next day to count absentee ballots.

Lamb, an ex-Marine and former prosecutor, was hoping to flip Pennsylvania’s red 18th Congressional District blue Tuesday.

GTY 931475018 A POL USA PA
Conor Lamb, Democratic congressional candidate for Pennsylvania's 18th district, and his grandmother Barbara Lamb exit the polling station after she voted at Our Lady of Victory Church, March 13, 2018 in Carnegie, Pa.
Drew Angerer, Getty Images

Murphy, a Republican, had held the seat for 15 years but state representative Saccone, a conservative Air Force veteran who worked in counterintelligence, had difficulty overcoming Democratic enthusiasm and a centrist Democrat who had done nearly everything right.

The election outcome may not be clear for days but don't expect an automatic recount if it's close. Even with such a tight race there is no automatic recount because it is a congressional race and not a statewide race. However, a recount is possible if three voters in every precinct petition for one.

"We're only a few hours away from me being the most hated man in America #PA18," tweeted Drew Gray Miller, the libertarian candidate, whose 1,300 vote total was higher than the difference between the top two candidates. 

Republicans had prepared Tuesday for a loss following a tightening of polls in recent days and openly attacked their candidate.

“This is a very tough environment for Republicans," said Corry Bliss of the Congressional Leadership Fund, a super PAC aligned with House Speaker Paul Ryan, R-Wis. "In order to win in a tough environment we need good candidates who run strong campaigns ... The Rick Saccone campaign was a joke. If we had even a serviceable candidate in this race, it would have been easy."

The eventual results will have national implications, even if court-ordered redistricting means the seat won’t exist by the time the winner runs for re-election in November.

GTY 931634946 A ELN ELE POL USA PA
Guests have their photo taken at a watch party for Republican Congressional candidate Rick Saccone at the Youghiogheny Country Club in Elizabeth Township, Pa. as the polls close on March 13, 2018.
Jeff Swensen, Getty Images

Democrats have said a win in this district — or even a narrow loss — means they can compete anywhere by capitalizing on Trump’s unpopularity and high levels of anti-Trump enthusiasm.

“These results should terrify Republicans," Democratic Congressional Campaign Committee Chairman Ben Ray Luján, D-N.M., said. "There are more than one hundred districts more favorable for Democrats than this one and we look forward to competing hard in every single one."

And conversations with voters Tuesday left little doubt those factors were part of what propelled Lamb’s candidacy.

AP PENNSYLVANIA ELECTION A USA PA
Republican Rick Saccone, center, is makes his way through a gang of cameras and reporters as he heads to the polling place to cast his ballot, March 13, 2018 in McKeesport, Pa.
Keith Srakocic, AP

“I like a lot of the positions (Lamb has) taken, but more importantly, I’m very upset with who we have as president and I see this as a referendum as well for what’s going on in the country,” said Paul Silver, 61, a musician from Mt. Lebanon who cast his ballot for Lamb.

But the candidates themselves created a race that may not be easily duplicated around the country. Lamb pitched himself as an average guy from the mostly white, working class district. Frequently clad in jeans and beat-up work boots at campaign events, he talked about the economy and jobs, focusing his outreach on veterans and union members.

He supported gun rights and opposed abortion, called for new leadership in his own party in Washington and avoided criticizing the president — whose popularity is 10 points higher in the district than it is nationally, according to Monmouth University polls out this month. 

“I’ll work on the problems our people face, secure their jobs and pensions, protect their families and I will work with anyone to do that," Lamb said during his speech to supporters. “We’re practical people, we’re serious people and tonight we celebrate regaining our voice and our vote in the great business of governing this country we love,” he continued.

GTY 931366264 A POL USA PA
Conor Lamb, Democratic congressional candidate for Pennsylvania's 18th district, votes at his polling station March 13, 2018 in Mt. Lebanon, Pa.
Drew Angerer, Getty Images

“I like what Lamb is doing, what I hear him talking about … it seems like he’s more truthful than Saccone,” Larry Callaway, 70, a retired steelworker from Rostraver said after casting a ballot for the Democrat.

Callaway voted for Trump in 2016 because, he said, he wanted change.

“I guess I got a real big change, more than I anticipated,” he said.

Lamb also proved to be a formidable fundraiser, with supporters giving nearly $4 million. Saccone's total was less than $1 million.

Outside GOP groups — aware of the symbolism of losing such a red seat — poured in more than $10 million to bolster him up. The pro-Ryan Congressional Leadership Fund was one of the race's heaviest spenders in favor of Saccone, shelling out nearly $3.4 million.

Saccone ran on Trump’s agenda — he told USA TODAY he would be the president’s “wingman” in Washington — and the president and top Republicans rewarded him by coming to Pennsylvania for rallies and campaign events. But the party focused more on the need to keep the seat in Republican hands than on Saccone’s dozens of years in public service.

For some voters, that was enough.

Despina Naylor, a 54-year-old housewife from Rostraver, said she voted for Saccone "just because he's a Republican" and would back Trump's agenda.

"I just don’t want to put any more kinks or put any more barriers in front of the president,” she said.

636565572468645241-Despina-Naylor.jpg
Voter Despina Naylor is pictured March 13, 2018. Naylor for GOP candidate Rick Saccone in order to help Donald Trump
Eric Miller, USA TODAY

Theresa Jacobs, a 51-year-old school bus driver from Boston, Pa., liked that Saccone had a record in Harrisburg she could look at.

“I’m more conservative — that’s why I went with Saccone. I feel that he’s done a great job as the legislator,” she said.

The victory Tuesday will be short-lived, however. The Pennsylvania Supreme Court redrew the state's congressional districts after it ruled the old map was unconstitutionally gerrymandered. The new map — which gets rid of much of the current 18th district and renames it as the 14th — is expected to be put in place before the November midterms when all House members have to run for re-election. 

The new 14th district will become even more Republican-leaning territory if Saccone wanted to run again. Lamb will reside in the state's newly competitive 17th district, now held by a Republican.

Contributing: Jakob Lazzaro, Eric Miller, and Caroline Vakil reported from southwestern Pennsylvania for the Medill News Service.