Fred Keller, a Republican state representative, beat Democrat Marc Friedenberg in the race to represent Pennsylvania's 12th District on Tuesday.

Keller’s victory means that the north-central Pennsylvania district will remain in Republican hands after former Rep. Tom Marino Thomas (Tom) Anthony MarinoWhy the North Carolina special election has national implications The Hill's Morning Report - Pelosi remains firm despite new impeachment push Republican wins special House election in Pennsylvania MORE (R-Pa.) stepped down in January, less than one month into his fifth term in office.

ADVERTISEMENT

The 12th District still tilts heavily in the GOP’s favor, unlike several districts in Pennsylvania that became more competitive for Democrats after the state Supreme Court ordered the state’s congressional lines to be redrawn.

President Trump Donald John TrumpBiden on Trump's refusal to commit to peaceful transfer of power: 'What country are we in?' Romney: 'Unthinkable and unacceptable' to not commit to peaceful transition of power Two Louisville police officers shot amid Breonna Taylor grand jury protests MORE would have carried the district by 36 points in 2016 had the state’s current congressional boundaries been in place that year, and Keller outspent Friedenberg by more than $140,000, according to federal filings.

Keller also got a last-minute boost on Monday when Trump held a rally in Montoursville, inside the 12th District, to campaign with the GOP hopeful.

Speaking to supporters there, Trump declared that the special election was tantamount to a “referendum” on his presidency.

“Get out tomorrow,” Trump urged supporters. “It’s a little bit of a referendum.”

Friedenberg, an assistant professor at Pennsylvania State University, ran against Marino for the seat in 2018. He lost that election by more than 30 points.

While the national parties have largely stayed out of the 12th District special election, Keller’s campaign tested some of the messaging that Republicans are hoping to use in 2020 as they look to retake control of the House and maintain their hold on the Senate.

On the campaign trail, the GOP state representative accused Friedenberg of championing socialism in the same vein as Sen. Bernie Sanders Bernie SandersOutrage erupts over Breonna Taylor grand jury ruling Dimon: Wealth tax 'almost impossible to do' Grand jury charges no officers in Breonna Taylor death MORE (I-Vt.) and Rep. Alexandria Ocasio-Cortez Alexandria Ocasio-CortezWells Fargo CEO issues apology after saying there was a 'limited pool of Black talent' Brand responds to Trump claim protesters throw tuna cans at police: 'Eat em, don't throw em' CNN's Don Lemon: 'Blow up the entire system' remark taken out of context MORE (D-N.Y.) while deriding liberal proposals such as the Green New Deal and "Medicare for All."

For his part, Friedenberg backs those proposals but rarely discussed them in his campaign, focusing instead on a more poll-tested message including issues such as health care and infrastructure.