When Larry Krasner took over the Philadelphia District Attorney’s Office in 2018 after decades as a civil rights and defense lawyer, he quickly overhauled staffing, set policy goals, and instituted a series of tone-setting mandates.

For instance, when requesting a prison sentence, each prosecutor was told to state in court the estimated cost to taxpayers of the incarceration. But several busy defense lawyers said they never recalled seeing that happen. The times it did, it irked some judges — even drawing a threat to hold an assistant DA in contempt, according to one DA’s Office staffer — so some prosecutors quietly dropped it.

Krasner says the policy stands.

The fate of that directive was one example of the challenges that arise when a bold reform ideology meets the daily churn of a busy courthouse that, when not beset by a pandemic, can grind through 10,000 cases a year.

In Krasner’s first term, many of his more substantive reforms have been instituted with greater success — even if they’ve been overshadowed in the public consciousness by surging gun violence, opposition from the police union, and a challenge from former homicide prosecutor Carlos Vega in Tuesday’s primary election.

True to his campaign promise, and to the outrage of some victims’ families, Krasner has not filed a single notice to seek the death penalty. He agreed to resentencing in 18 capital cases. His Conviction Integrity Unit has successfully advocated for 20 exonerations of men who collectively served centuries of wrongful imprisonment — while calling out official misconduct by both police and prosecutors. He also began dropping drug-possession charges for defendants who enrolled in treatment, rather than jailing them or forcing them into diversion programs that pose an ongoing risk of incarceration.

In part through his efforts, Philadelphia cut the number of people on probation or county parole by a third and reduced racial disparities in sentencing — all with no increase in recidivism, according to an analysis by his office. His bail policies also resulted in a 22% reduction in defendants who spent a night in jail, an independent study found, with no impact on re-offending or court attendance. His efforts, including backing the expansion of “early bail review” hearings within days of arrest, have also helped keep the city jail population below 5,000 people for most of his tenure.

» READ MORE: Philly’s overturned murder cases call decades of homicide investigations into question

Perhaps most important was a shift toward a culture of transparency, according to Keir Bradford-Grey, Philadelphia’s former chief public defender.

“If we had clients where the evidence was questionable after we did our investigation, in the old days we couldn’t go to a DA and say, ‘Hey, look at this. You may want to withdraw the case,’” she said. “With Larry’s team, there was much more opportunity to talk things through and share information that wasn’t going to just be taken, hidden in a file, and then the DA find a way to circumvent that information and go forward with the case.”

Viewed through a different lens, though, that could be seen as the DA dropping potentially viable cases — and police, from street patrols all the way up to the commissioner, have taken aim at Krasner as a result.

“There’s nothing to deter folks,” Police Commissioner Danielle Outlaw has repeated, in interviews and at crime scenes, seemingly blaming the DA for a rise in gun violence.

Krasner has countered that the rising violence, mirrored in other cities, is driven by complex factors, including the pandemic. He also defended his conviction rate, which was almost 85% before the pandemic, pointedly calling it the “we don’t cheat rate.”

The Fraternal Order of Police emerged as a major critic early in Krasner’s term, casting him as “Mister Softee” in one recent campaign stunt. Former U.S. Attorney Bill McSwain was among those who took to saying that criminals affectionately call Krasner “Uncle Larry.”

Krasner’s approach also rankled some other justice-system players, including some judges and predecessors like former Gov. Ed Rendell, a two-term Philadelphia DA who endorsed Vega and said Krasner puts too much emphasis on reform and not enough on safety.

In an interview, Krasner rejected that claim. “That is a deliberately false narrative. ... The truth is you cannot have safety without reform. It’s the reform that loosens up the resources to make us safer.”

He cited his approach to the gun crisis as an example. Working with the courts, he said, he was able to consolidate and expedite fatal and nonfatal shooting cases with the aim of quicker resolutions — resolving cases 40% faster — before the pandemic closed courts. He said he’s also worked with police to place prosecutors in every detective division and the Delaware Valley Intelligence Center, resulting in improved relationships and more effective intelligence-gathering.

His relationship with police has not been helped by the fact that he has prosecuted 23 officers for on-duty misconduct. Krasner called it a “sea change from prior administrations that largely acted as lawyers for cops and largely acted as a cover-up organization for police misconduct.”

So far, judges have tossed out seven of those cases at preliminary hearings, citing a lack of evidence. Two detectives have also filed lawsuits over the DA’s investigations of police, alleging that prosecutors manipulated their reports.

» READ MORE: Carlos Vega’s campaign to be Philly DA started in his mom’s bodega

Other big policy changes have rolled out with little friction — like declining charges for prostitution and downgrading low-level retail thefts to summary offenses.

Aisha Mohammed, director of community organizing and policy development at Project Safe, said it’s an important step, though she would like to see even fewer arrests. (Those picked up on a third or fourth offense for prostitution may still be charged.) Each arrest, she said, can disrupt steps toward finding housing or getting enrolled in drug treatment.

But Vega, in a televised debate, argued that not arresting has consequences, too. “Businesses are leaving,” he said. “It is ludicrous that for someone to be charged with a crime, you have to steal $500 worth of product.”

That type of push-and-pull has been evident in some policy decisions that have drawn fire from both sides.

Krasner, impatient to stop the use of money bail, which disproportionately impacts poor Black and Latino defendants, last year unilaterally instituted a plan to either support pretrial release or seek $999,999 bail. That drew outrage from reform advocates. It also failed to produce the desired results, as bail magistrates often rejected the high bail requests, enabling many facing gun charges to be bailed out.

Youth advocates also lament that about as many minors still come through the adult system as in the previous administration. On the other hand, they note, Krasner took office just as hundreds of former juvenile lifers were being resentenced pursuant to a U.S. Supreme Court ruling — and offered many imprisoned for decades without any misconduct the chance for immediate parole.

Jondhi Harrell, who heads the North Philadelphia-based Center for Returning Citizens, said Krasner’s greatest achievement may be restoring trust in the office.

“That set a new tone for policing,” he said. “Also, I believe that he’s sent a signal to the nonwhite and poor communities that a DA’s Office, although the primary job is to prosecute wrongdoing, it’s also to reform the criminal justice system, to redress past abuses and to make sure that they do not continue into the future.”

Harrell’s main criticism — one that has dogged Krasner throughout his tenure — was insufficient communication with crime victims. “Community relations and the perception of the office is important,” he said.

» READ MORE: The Philly DA race is personal in neighborhoods most affected by crime and incarceration

Detractors raise what they say are systemic issues: that amid the push for reform, the everyday machinery of the office has faltered. They cite, as one cause, an exodus of longtime prosecutors who have been replaced by less experienced lawyers. Krasner fired 33 lawyers when he took office, including Vega, who sued alleging age discrimination.

In City Councilmember Maria Quiñones-Sánchez’s view, Krasner’s policies are sound — and the problem is politics.

Reforms to the juvenile system, for example, were huge for “any parent who has a kid get in trouble,” she said. “But those are things that you can’t say in a soundbite. You can’t say in a commercial, because they’re very personal. ... Unless you were directly impacted through an incident, it’s hard to tell.”

She said Krasner needs to do more to secure buy-in from all stakeholders. Instead, he finished his first term as an incumbent without the endorsement of either Mayor Jim Kenney or the Democratic City Committee, a rare snub for an incumbent Democrat.

“You run to be a disrupter, but then you also have to learn to govern from there, and you don’t govern on an island,” said Quiñones-Sánchez, who is supporting Krasner’s reelection.

Krasner said he’s learned the political part of being DA on the job — and pointed to a long list of other endorsements by wards, lawmakers, labor groups, and clergy to show how far he’s come. He takes credit, too, for growing support for investing in gun-violence prevention, rather than only punishment.

“The ideas we are putting forward are ideas that are embraced by the people, but aren’t immediately being embraced by institutions,” he said, “but we are seeing a shift toward consensus.”

Staff writer Chris Brennan contributed to this article.