Philadelphia District Attorney Larry Krasner, a champion of shaking up the criminal justice system, easily turned away a Republican challenge Tuesday to win a second term.

By defeating defense lawyer Chuck Peruto, Krasner buttressed his position as a national leader among a newer breed of progressive prosecutors who critique mass incarceration and promote alternatives to harsher justice measures. His victory comes even as murder rates in Philadelphia have climbed to record levels.

With 90% of the ballots counted, the Democratic incumbent had won more than twice as many votes as Peruto.

After his victory, he pledged to do a better job informing the city about his agenda.

“One of the things that I believe that we learned in the first term is that we got a lot done, we kept a lot of promises,” Krasner said. “And they were in fact what Philadelphia wanted. But Philadelphia did not always know what we were doing.”

A veteran defense attorney before taking office, Krasner, 60, has sought to overhaul a system that he says put far too many people needlessly behind bars even as it covered up the misdeeds of rogue police. He said he wanted his staff to focus on the most dangerous criminals in the city while de-emphasizing the pursuit of low-level offenders.

Krasner stopped seeking cash bail for some misdemeanor and nonviolent felony cases. He touted his revamped Conviction Integrity Unit, which has reviewed and then helped overturn 22 convictions by his predecessors. He also stepped up prosecution of police officers, including bringing perjury charges in August against three former homicide detectives who investigated a case in which a man was convicted of rape and murder but later cleared at retrial after DNA evidence pointed to a different suspect.

Krasner barely campaigned after winning the Democratic primary in May, when he defeated a career prosecutor whom he had fired after taking office in 2018. The police union, the Fraternal Order of Police, which has repeatedly clashed with Krasner, backed his opponent in the spring and helped fund a political action committee that lobbed attacks. The union resistance was considerably less in the general election.

Krasner mostly ignored Peruto, refusing to debate him and denying him a platform from which to attack. He also pointed to a series of controversial statements the Republican challenger made after announcing his candidacy in February.

With a small campaign budget and no staff, Peruto said he basically oversaw his campaign on his own. He took in the loss with a dozen friends and family members in the bar of his Rittenhouse home, or as he calls it, the campaign headquarters. He tried to find humor in his defeat.

Asked what he might have done differently, Peruto replied: “Not run.”

Peruto, 66, a former Democrat who supported Krasner in 2017, drew attention in May for his unconventional campaign website, which included an explanation of the accidental death of his paralegal and girlfriend who died in his home in 2013 while he was out of town.

The website also featured a provocative video of Peruto declaring public safety more important than civil rights, while making sweeping statements about race and crime. “I understand Black people just about as well as a Black person,” he said in the video.

The Inquirer in March found that while arrests for illegal possession of a gun were on the rise, convictions for that crime had fallen since Krasner took office in 2018. Krasner in part blamed that on weak cases being presented by the Philadelphia Police Department, prompting critics to complain that he blames others before taking responsibility.

Of late, he has noted that the city has 11% more killings at this time compared with last year but that the rate was 38% higher three months ago. “I say with some cautious optimism we see some motion that it is going in the right direction,” he said.

Still, Philadelphia appears on track for more than 500 murders in 2021, its highest total ever.

Like many of his critics, some Democratic leaders were troubled by Krasner’s approach to gun violence and a sense that he blamed others for the crisis.

Krasner consistently points out that gun violence was spiking in large cities nationwide and that the pandemic had been a driving factor. He also pointed toward his primary victory this year, when he won two-thirds of the vote and surged to even higher numbers in neighborhoods most impacted by gun violence.

State Sen. Anthony Hardy Williams, a Democrat who represents West Philadelphia, campaigned Tuesday in Cobbs Creek with Krasner. There, Williams said his constituents like Krasner but want more from him to improve public safety.

However, Williams added: “They like that he doesn’t just throw somebody of color up against the wall and say you’re automatically guilty. Most people don’t look at Larry Krasner simply as a prosecutor. They look at him as a person who is changing the system.”

Krasner’s first term was marked by clashes with city, state, and federal officials — Mayor Jim Kenney, state Attorney General Josh Shapiro, former U.S. Attorney Bill McSwain — and criticism about a lack of coordination in their approaches to public safety.

State Rep. Joanna McClinton of West Philadelphia, the Democratic leader in the state House, called on Krasner to push for a “very serious and targeted collaborative approach” to law enforcement.

Krasner was among the first in a wave of progressive reformers in big cities. Those reformers are now winning second terms while more progressives are winning office for the first time.

Krasner estimates that 70 million Americans now live in a jurisdiction with a progressive prosecutor, double the total just two years ago.

“So what is happening here is really just a microcosm of what’s happening all across the country,” he said Tuesday. “And what’s happening all across the country is the grassroots are very clear that they want a different kind of criminal justice — that focuses on the most serious crime, that doesn’t do excessive things with minor offenses.”

In the other local nonjudicial race on the ballot, City Controller Rebecca Rhynhart, a Democrat, rolled to a second term after facing no challengers in the primary or general elections. She is widely seen as a potential contender for mayor in 2023.

Staff writer Ellie Rushing contributed to this article.