Two lawyers from Pennsylvania's Montgomery County will face off in November to replace Attorney General Kathleen Kane.
Democratic contender Stephen A. Zappala, who won 74 percent of his home county but only 37 percent of the state overall, said he goes back to work Wednesday as Allegheny County District Attorney.
"We’re not going to win this race," Zappala said, conceding. "We’ve got too much ground to make up. I’ve called the commissioner, and I’ve congratulated him on what happened tonight."
Sen. John Rafferty squashed former prosecutor and police officer Joe Peters to win the GOP nomination.
Rafferty, now in his fourth term and Transportation Committee chairman, promised to restore credibility and public confidence in the 800-employee office. He emphasized a career that has included work as a prosecutor in the office, drawing a sharp contrast with Montgomery County Commissioner Josh Shapiro.
"We can't continue on in the same vein, we can't continue on with someone with limited experience in the legal field," he said.
With about 85 percent of precincts reporting, Shapiro held a 9-point lead over Zappala, his closest challenger, and many more over fellow sitting district attorney John Morganelli of Northampton County.
"I think it's critical that we restore integrity and fairness in our justice system and make sure that the system works for everyone, that we take on the status quo and we hold people accountable for undermining our communities," Shapiro said.
Zappala emphasized issues facing the next AG, including asset forfeiture, mandatory minimum prison sentences and the opioid abuse epidemic. He said state police need to play a stronger role and better communicate with local district attorneys.
“We’re not coordinated enough," he said. "We have the assets, we just don’t bring the assets to bear. I just hope some of the discussions we’ve had across Pennsylvania create that type of relationship.”
Kane isn't seeking a second term. She's facing trial on charges she unlawfully leaked grand jury information and the lied about it. She was stripped of her law license last September.
Kane was the first woman and first Democrat to be voted into the job since it became an elected office more than three decades ago.
She was viewed as an up-and-comer in state politics early in her tenure, making a name for herself with several high-profile decisions. She declined to defend a state law prohibiting gay marriage and blocked a plan by then-Gov. Tom Corbett, a Republican, to hire an outside company to manage the state lottery.
Her campaign promise to investigate how state prosecutors handled the Jerry Sandusky child molestation scandal led to an investigation that found no signs that Corbett and others had made decisions for political reasons.
But it turned up evidence that state prosecutors, lawyers, judges and others had been trading emails with salacious content and messages that demeaned women, minorities, gay people and others. Two state Supreme Court justices have retired over their participation in the scandal, dozens within Kane's agency have been disciplined, and an outside review of the emails is underway.
Kane announced Feb. 16 she would not seek a second term while she prepares for her August trial on perjury and other charges.
The attorney general's office prosecutes such major crimes as drug rings, organized crime, child predators and public corruption, and it works to protect consumers from fraud, represents state agencies in litigation and handles cases when local district attorneys have conflicts.
The Associated Press contributed to this report.