CANONSBURG, Pa./WASHINGTON (Reuters) - Republicans sounded the alarm on Wednesday after Democrats claimed victory in a Pennsylvania congressional election seen as a referendum on U.S. President Donald Trump’s performance, although the vote tally remained officially too close to call.

In an ominous sign for Trump’s Republicans eight months before national midterm elections, moderate Democrat Conor Lamb led conservative Republican Rick Saccone on Wednesday by a fraction of a percentage point for the House of Representatives seat.

The earliest the election result could be certified is March 26, according to a state official, but the final tally could be unknown for weeks.

County officials are expected to begin counting provisional paper ballots late this week, and military ballots next week, officials said.

Republicans have until the results are officially certified to challenge the outcome or pursue a recount. Saccone on Wednesday afternoon sent a fundraising email to supporters saying the “campaign is far from over.”

The election should have been a shoo-in for Republicans in a district that Trump won by almost 20 points in the 2016 presidential election. He campaigned for Saccone, who started the race well ahead of Lamb.

Republican Speaker Paul Ryan called the election a “wakeup call” in a meeting with Republican House members and pushed them to raise more campaign funds. He also urged them to do more to highlight tax cuts approved by the Republican-dominated Congress and signed by Trump.

Lamb led Saccone by 627 votes on Wednesday, the state’s unofficial returns showed; Lamb had 49.8 percent of the vote and Saccone 49.6 percent.

With about 500 provisional, absentee and military ballots to count, according to the New York Times, Lamb’s lead appeared to be safe. The vast majority of the outstanding ballots were in Allegheny County, officials told Reuters, where Lamb received over 57 percent of the vote.

Slideshow ( 18 images )

Republicans have not conceded the race and were not ruling out a recount or other legal action, a spokesman for the National Republican Congressional Committee said.

House Republicans called the race unique, noting that Lamb, 33, a Marine Corps veteran, had distanced himself from his party’s leaders and staked out positions to the right of many Democrats.

“I don’t think you’ll see another candidate like Lamb,” said Republican Representative Chris Collins of New York.

Representative Mike Kelly, who represents Pennsylvania’s 3rd District, said Lamb was “more like a Republican.”

‘TRUMP BEFORE TRUMP WAS TRUMP’

The patchwork of small towns, farms and Pittsburgh suburbs that make up Pennsylvania’s 18th congressional district is so Republican that Democrats did not even field candidates in the previous two House elections.

Come November, the district will cease to exist because boundaries have been redrawn. Both Lamb and Saccone were expected to run again, though in different districts.

Saccone, 60, a former Air Force counter-intelligence officer, has described himself as “Trump before Trump was Trump,” and in January he led the race by more than 10 percentage points.

Slideshow ( 18 images )

Trump held two events in the district during the campaign, including a rally on Saturday. Last week, he announced tariffs on imported steel that had been expected to appeal to voters in a state known for its steel industry.

The election, held to replace a Republican who resigned amid a scandal last year, was the latest forceful electoral showing for Democrats, who also won a governor’s race in Virginia and scored a U.S. Senate upset in conservative Alabama.

Lamb’s strong showing could buoy Democrats nationally as they seek to win control of the House from Republicans in the November elections. Democrats see 118 Republican-held districts in play. If they flip 24 seats, they could reclaim a House majority.

Saccone’s poor performance is worrying for Republicans who were sure that tax cuts they passed last year, the party’s only major legislative achievement under Trump, would be a vote winner.

A Lamb win could vindicate a strategy Democrats are using in some races to enlist candidates whose positions and ideologies are well suited to the district even while conflicting in significant ways with the positions of the Democratic leadership in Washington.

Lamb advocated for gun rights and said Nancy Pelosi should be replaced as House Democratic leader, making it harder than expected for Republicans to attack some of his positions.

Representative Tim Ryan, a Democrat from the Ohio Rust Belt who unsuccessfully challenged Pelosi’s leadership in late 2016, said he believed Lamb’s apparent victory sent a message to other candidates not to be afraid to break with party leadership.

“I hope it means that other candidates will take the lead, and run a very organic race based on the communities that they come from,” Ryan told reporters.

Representative Cheri Bustos, a Democrat from a largely agricultural and blue collar district in Illinois, said Lamb was a strong candidate because he mirrored his district.

“When you have swing districts, you better make sure you’ve got a candidate that fits that district,” Bustos said.