Republicans in Pennsylvania gave President Trump and the national party a shot in the arm Tuesday, delivering three special state House elections to the GOP, including one district won by Hillary Clinton in 2016.

While all three seats had been held by Republicans, the 18th District seat in Bucks County was expected to turn Democrat and confirm the Democratic swing that gave Clinton a 9-point win in 2016.

Local media and Democratic Party officials had said that the district should have been an easy pickoff because of the political trend, a Democratic registered voter edge, and the perceived backlash in the Philadelphia suburbs against Trump.

But, in the end, the GOP appears to have held the seat and by a wide margin, though the results have not been certified.

Bucks County spokesman Larry King told WHYY that Republican K.C. Tomlinson beat Democrat Harold Hayes 3,826 to 3,343.

The GOP also won two other special state House elections.

Democrats were eager for proof of an anti-Trump trend in the state the president needs to win reelection. In his campaign “dossier,” Hayes played up the expectations. It said:

“This is a favorable district for a Democrat. Voters in HD18 chose Hillary Clinton over Donald Trump in the 2016 Presidential election (Clinton: 52.85%; Trump: 44.12%). Voters chose Barack Obama over Mitt Romney in the 2012 election (Obama: 57.88%; Romney: 40.91%). Democratic Governor Tom Wolf won this district in 2014 (Wolf: 58.18%; Corbett: 41.82%), and improved on that performance in the 2018 gubernatorial election (Wolf: 61.90%; Wagner: 38.10%). That same year, Democratic Senator Bob Casey easily carried HD18 (Casey: 59.75%; Barletta: 40.25%). HD18 is fully nested within Pennsylvania Congressional District 1, which has a Cook Political Voting Index of D+31.”

And, during the 2016 race, Joe Biden and Clinton running mate Sen. Tim Kaine campaigned in towns just outside the district lines. Clinton campaigned in nearby Philadelphia on election eve.

But Republican Tomlinson Tuesday held it in a hard-fought campaign where the state and national Republican Party played and the Trump campaign offered volunteers and social media help.

“This is a seat the Democrats thought they should have won, and there were plenty of stories saying we would lose it,” a Trump campaign official said.

“This is proof that our message and the message of the president is still resonating and that people haven’t turned their back on the GOP or the president,” said the local field operative.