HARRISBURG, Pa. (AP) — Republican Fred Keller, a conservative state lawmaker, won the special election for Congress on Tuesday in a heavily Republican district that sprawls across areas of central and northern Pennsylvania that are a stronghold for President Donald Trump.

Keller, of Snyder County, will replace Republican Tom Marino, who resigned in January after he emerged as a strong Trump ally in Congress.

Keller beat Democrat Marc Friedenberg in the 12th District, where registered Republicans outnumber Democrats by about 100,000.

On Monday night, Trump flew into the district for a campaign rally where he also touted Keller's candidacy.

Keller, in turn, is a staunch advocate for Trump, appearing on stage with him at the rally in Montoursville and saying he wants to go to Congress to be a vote for the president.

The two-year term runs through 2020.

Keller, 53, is a fifth-term member of the state House, and one of its most conservative, with a 90% lifetime rating by the American Conservative Union.

The district covers all or parts of 15 counties and strongly backed Trump in 2016's election, with Trump beating Democrat Hillary Clinton by more than 2-to-1 there.

Before he ran for the Legislature, Keller was a plant manager for a wood cabinet supplier and ran a real estate management business.

Friedenberg, a lawyer and Penn State information technology instructor, also ran in November and lost to Marino by 32 percentage points.

Friedenberg supported ideas that are popular on the Democratic Party’s left wing, including “Medicare for All” — shifting the nation’s health care system to a government-run “single-payer” plan — and the Green New Deal, a sweeping plan that aims to transform the U.S. economy to combat climate change and create thousands of jobs in renewable energy.