HARRISBURG — A look at the winners in key races in Pennsylvania’s primary:

U.S. House Special Election

Republican Fred Keller, a state lawmaker from Snyder County, won the special election for Congress in a heavily Republican district that sprawls across central and northern Pennsylvania. Keller, 53, will replace the Republican congressman who resigned in January.

He beat Democrat Marc Friedenberg and ran with the support of President Donald Trump. The 12th District also strongly supported Trump in the 2016 election.

The two-year term runs through 2020. Keller is a fifth-term member of the state House of Representatives, and one of its most conservative members, with a 90% lifetime rating by the American Conservative Union.

Legislative Special Election

Republicans won special elections for three open seats in the state Legislature in heavily GOP districts in southcentral and western Pennsylvania.

For the 33rd Senate district in southcentral Pennsylvania, Republican Doug Mastriano beat Democrat Sarah Hammond; for the 41st Senate district in western Pennsylvania, Republican Joe Pittman beat Democrat Susan Boser; and for the 11th House district in Butler County, Republican Marci Mustello beat Democrat Sam Doctor.

Candidates looked to fill the seat once occupied by GOP Rep. Brian Ellis, who resigned in March, days after a woman who accused him of sexual assault filed a formal complaint with the majority House Republicans.

All three seats were last held by Republicans, and the special elections have no effect on Republican control in both chambers.

Superior Court Judges

A steelworkers' union lawyer and a county prosecutor have been nominated to run for open seats on a statewide appellate court.

Democrat Amanda Green-Hawkins, a Pittsburgh lawyer, and Republican Megan King, a Chester County prosecutor, won spots on the fall ballot in Tuesday’s primary election for the state Superior Court.

Races for the last two spot remained too close to call Tuesday night.

Allentown Mayor

Ray O'Connell declared himself the winner in Allentown's mayoral race over challengers Michael Daniels, Cheryl Johnson Watt and Patrick Palmer.

The interim mayor will run against Republican Tim Ramos in November to fill imprisoned former Mayor Ed Pawlowski's term.

Pittsburgh District Attorney

Pittsburgh’s longtime top prosecutor has fended off a challenge in the Democratic primary, his first in 20 years.

Allegheny County District Attorney Stephen Zappala on Tuesday defeated Turahn Jenkins, a former public defender who criticized his handling of the case of a white police officer charged in the fatal shooting of a black teenager.

Council upset in Pittsburgh

Longtime Pittsburgh Councilperson Darlene Harris was defeated by Bobby Wilson during Tuesday’s Democratic primary, in what the Pittsburgh Post-Gazette calls “an electoral upset that will surely shock City Hall and give Mayor Bill Peduto a cause to celebrate.”

Wilson, a medical researcher, earned the endorsement of the city’s mayor, Bill Peduto. Harris has served on council for more than a decade.

Inquirer staff writer Patricia Madej contributed to this report.