PHILADELPHIA (CBS/AP) — Philadelphia voters have selected Larry Krasner to be the city’s top prosecutor.

Krasner, a Democrat, beats out Republican Beth Grossman to succeed former District Attorney Seth Williams, who was sentenced last month to prison for corruption.

Former Philadelphia District Attorney Seth Williams Sentenced To 5 Years In Prison In Corruption Scandal

Krasner has said he will encourage a number of reforms, including changes in bail practices that currently result in many poor people being jailed while awaiting trial and alternatives to incarceration for lower-level crimes. His bid was opposed by the local police union, which endorsed Grossman.

“My view of justice means you don’t just look at when incarceration is appropriate but look at when it’s not appropriate and take into account the tremendous costs it imposes,” he said during the final days of the campaign.

His campaign got a $1.5 million boost ahead of the May primary from billionaire investor George Soros, a Democratic donor who has given to a number of district attorney candidates around the country.

John McNesby, president of the city Fraternal Order of Police chapter, called Krasner “anti-law enforcement” after Krasner’s supporters bashed the union during chants at the candidate’s primary victory party. But Krasner predicts he’ll have a productive relationship with the department. He was endorsed by the local chapter of The National Black Police Association.

He said he will be a help to the police commissioner.

“We are in a city where police commissioners for a long time have needed a district attorney who would be supportive when they try to fire and try to discipline and try to hold their officers accountable rather than always siding with the FOP because it was politically convenient,” he said.

During 30 years as a civil rights attorney, Krasner has defended a host of protesters and activists, from Black Lives Matter demonstrators to the hundreds of people arrested during the Republican National Convention in 2000.

He said none of his clients has been sent to death row in 25 years of defending capital cases. Pennsylvania under Democratic Gov. Tom Wolf has a moratorium on executions, but prosecutors can still pursue death sentences.

Though he has no experience as a prosecutor, he said his experience as a defense attorney helped prepare him to be the city’s top law enforcement officer.

“When you are preparing cases for the defense, you are also simultaneously preparing in your mind the prosecutor’s case because that is the only way you win,” he said.

He will take office in January. As of Nov. 6, the city had recorded 272 homicides, a 15 percent increase over same period last year, putting the city on track for its deadliest year since 2012.

“I extend my sincerest congratulations to District Attorney-elect Larry Krasner and his team. I look forward to working with him to continue the City’s MacArthur Safety and Justice Challenge and our other efforts to make the criminal justice system more equitable and effective,” said Philadelphia Mayor Jim Kenney. “While we’ve reduced our incarcerated population by nearly 20 percent in the last two years, there is still important work to do.”

Krasner has said he will target the 6 percent of criminals who commit most of the city’s serious crimes, in part by spending more on proactive policing.

“We have to recognize that we can’t incarcerate our way out of this. It hasn’t worked for decades, and it’s not going to work now,” he said.

He also said he will resist Trump administration policies, including a push for a return to longer prison terms.

(TM and © Copyright 2017 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2017 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)