A photo finish among four candidates triggered the state's automatic recount law for the first time since it went into effect five years ago. The recount began Nov. 18, and ballots had to be double-checked in all 67 counties.
Lazarus was the only Democrat to win one of the seven appellate-court seats up for grabs.
In a statement, Lazarus said she was proud of her victory after two decades on the county bench.
"This race was incredibly close, and I share this victory with my supporters and volunteers," she said.
Recounted totals released by Secretary of State Pedro Cortes did not change the winners among the Superior Court candidates that unofficial returns showed on election night. In all, nine candidates sought four open seats on the court.
The winners were Allegheny County Judge Judy Olson, with 954,065 votes; Tioga County lawyer Sallie Mundy, 870,091 votes; Chester County Judge Paula Ott, with 807,327 votes all Republicans and Lazarus, with 726,917 votes.
Allegheny County Judge Robert Colville, a Democrat, had 724,830 votes; Pittsburgh lawyer Temp Smith, Republican, 723,117; Allegheny County prosecutor Kevin McCarthy, Democrat, 714,237; Philadelphia County Judge Teresa Sarmina, Democrat, 690,682; and York lawyer Marakay Rogers, Libertarian, 127,492.
State officials had estimated the recount would cost taxpayers as much as $1.3 million. They said Tuesday the final tab could not be tallied until all counties submit requests for payment.



