The primary was seen as referendum on whether a wave of prosecutors elected on promises of criminal justice reform - measures like shorter probation and parole and a curtailing of cash bail that disproportionately keeps poor defendants confined before trial - would be blamed for increasing violence.
SEE ALSO: Full election results here
Krasner addressed supporters in Center City on Tuesday night after winning the nomination.
"The second term, which is 4.5 years- starts now," declared Krasner to a cheering crowd.
The win comes after a bitter battle in the primary with former homicide prosecutor Carlos Vega.
"We are going to continue down a path that joins a focus on very serious crime with reform that is constructive for society," Krasner said.
Vega billed himself as a third option between traditional law-and-order prosecutions and reform.
RELATED: Pa. voters back bid to ban race discrimination in constitution
"This was not easy for the (crime) victims especially," Vega said after conceding Tuesday night. "Please remember them. ... I am hopeful that my opponent will take them more seriously during his tenure."
Krasner's allies linked his victory to the movement for racial justice.
"Last summer, tens of thousands of young Black people took to the streets to demand we disinvest from our police force and begin investing in Black communities," Councilmember Kendra Brooks said in a statement. "The re-election of Larry Krasner is a testament to the movement's strength."
Krasner will be seen as the favorite against GOP challenger and well-known local attorney Charles Peruto Jr. in the November general election in a city where Democrats vastly outnumber Republicans.
Critics blame Krasner and other progressive prosecutors for the increase in gun crimes. Supporters have pushed back, noting that rising violence during the pandemic - amid reduced social services and economic instability - are hitting cities with both liberal district attorneys and traditional law-and-order prosecutors.
Krasner, a 60-year-old longtime civil rights and defense attorney, won election in 2017 against a crowded field by billing himself as the outsider candidate capable of making radical change.
"Our promise fundamentally was that we would focus on serious crime while bringing reform. We said we would do something about mass incarceration. We have cut the future years of incarceration in half," he said Saturday.
Krasner has drawn support from City Councilmembers like Jamie Gauthier.
"This feels like Philadelphians meant it, they meant what happened the first time, and they mean it even more now," Gauthier said.
The current team of prosecutors also slashed the length of parole and probation supervision by nearly two-thirds compared to the previous administration, Krasner said. Pennsylvania has gotten a lot of attention for being an outlier with the length of probation and parole terms far above the national average.
Krasner strengthened the office's conviction integrity unit, which has helped free nearly 20 wrongfully convicted people, and also touts grant funding used to create the office's first data team that looks at the long-term effect of policies, hiring the office's first criminologist and playing a role in the ending of a 10-year contract that shared data with U.S. Immigration and Customs Enforcement.
"Trump was trying to deport victims of domestic violence... and we cannot have a world where they are afraid to walk into a courthouse or afraid to seek help," Krasner said.
Vega picked up support in the Northeast section of the city, the river wards, and parts of South Philadelphia, with Krasner leading everywhere else.
Vega's plans had included bringing federal law enforcement partners to the table to press what he says are a small number of people responsible for gun crimes. Vega, 64, wanted to create an earn and learn approach to supervision, where each benchmark a person earns would knock time off of his or her probation or parole.
The Fraternal Order of Police, Lodge 5 in Philadelphia had sunk more money and effort into unseating Krasner than perhaps any political race in recent memory, said Lodge President John McNesby. The group backed Vega and hammered home messaging that blamed rising homicides and gun violence on Krasner. On a recent sunny afternoon, McNesby handed out soft serve cones after parking a Mr. Softee ice cream truck in front of the district attorney's office with the message that Krasner is soft on crime.
Meanwhile, the Philadelphia chapters of the Guardian Civic League and Club Valiants - fraternal organizations representing Black and Latino police and firefighters - had endorsed Krasner for another term. The groups last year had fought with the larger police union and the local firefighters union over endorsements of former President Donald Trump, who they said supported racists and did not represent them.
Thousands of voters had switched parties from Republican to Democrat for the primaries, in an effort to get Vega on the Democratic ticket, in the heavily Democratic city.
In a statement, Vega thanked supporters "and most especially the victims of crime who bravely stood up when the establishment, the celebrities and the media decided they wouldn't listen."
Peruto Jr. ran unopposed Tuesday for the Republicans.
The Associated Press contributed to this report.