In a closely-watched race with national implications, Larry Krasner, the defense attorney who became the darling of the social justice movement, has become a near-lock to become district attorney of Philadelphia.

Krasner, who has represented clients including Occupy Philly and Black Lives Matter, has won the Democratic primary and will represent the party on the November ballot. And in a city with a 7-to-1 Democratic voter registration advantage, the odds are high that come January, he’s going to be the DA.

Since the early days of this race, pundits predicted low turnout. But it actually drew more voters than the election that put now-disgraced District Attorney Seth Williams into office in 2009. Unofficial election results show 108,000 votes were cast with 75 percent of precincts reporting, meaning voter turnout is higher than than the last competitive district attorney’s race in 2009, when 103,000 votes were cast.

Krasner’s win is politically significant. For one thing, a civil rights attorney winning a local election like the Philadelphia district attorney’s race has national implications. It’s one of the first tests of the anti-Donald Trump resistance movement in Philadelphia, and it showed nationalizing a race in this way — thanks to George Soros, John Legend, Susan Sarandon, etc. — can work.

Setting aside the Hollywood glitz, Krasner’s win likely means fundamental changes for the scandal-ridden Philadelphia district attorney’s office. In a way, Krasner is the inverse of EPA head Scott Pruitt or other Trump administration cabinet members who were appointed because they wanted to blow up the exact agency they’re expected to lead.

Krasner’s spent the better part of his career criticizing a system he’ll now likely lead, unless something unexpected happens in November and Republican candidate Beth Grossman pulls off a win, or an independent enters the race.

But for now, Krasner will remain the favorite to prevail in November. Today, he beat out some formidable opponents who had formed their own coalitions of support, including former federal prosecutor Joe Khan, former managing director of the city Rich Negrin, former prosecutor Michael Untermeyer, ex-Seth Williams right-hand-man Tariq El-Shabazz, Municipal Court judge Teresa Carr Deni and prosecutor John O’Neill.

Of the candidates, Krasner quickly emerged as the darling of the left, the “Bernie Sanders of the DA’s race,” if you will. Over his career in criminal defense, he made a name for defending protesters and, just after announcing a run for district attorney, was endorsed by Black Lives Matter organizer Asa Khalif and other progressives. On the other hand, the not-exactly-excited-about-criminal-justice-reform police union had endorsed Negrin.

Krasner is an avowed progressive and a longtime, very vocal civil rights activist who managed to draw the entire race farther to the left. He’s run a Center City law firm for about 25 years that’s focused on criminal defense and civil rights. He’s represented groups like ACT Up and Black Lives Matter, and says he’s filed “more than 75 civil rights lawsuits against the police for corruption and physical abuse.”

His progressivism on criminal justice clearly resonated. Krasner didn’t have any experience as a prosecutor, yet still won today. Not only was he able to harness star power on both the local and national level, but advertisements in his favor were everywhere, thanks largely to liberal billionaire George Soros, who dumped more than a million dollars into the race to support Krasner.

But it’s Krasner’s super-progressive platform that could sow chaos not only when it comes to who will support him in November, but what it could mean for the Office of the District Attorney if he were to win. While some former prosecutors have publicly stated their support for Krasner and his vision to better implement criminal justice reforms, others have railed against him, particularly a group of ex-assistant district attorneys who penned an open letter urging against voting for Krasner.

A win in November for Krasner would also undoubtedly upend the already-in-turmoil office that, for the last two months has been operating under indicted District Attorney Seth Williams, the two-term Democrat who was charged with corruption in March, had his law license suspended and continues to refuse to resign.

And while Williams did implement some criminal justice reforms during his tenure — particularly with regard to diversionary programs for people charged with committing nonviolent offenses — he fell short in the eyes of many of the city’s organizers and criminal justice reform activists.

Others in the criminal justice community have pointed out that the winner of the Philadelphia DA’s race is an important local check on a national system.

“The criminal justice system, while it’s a national problem, it’s really upheld by local actions and local policymakers,” Bryan Mercer, executive director of the Media Mobilizing Project, said in March. “And so the district attorney in Philadelphia really determines what our criminal justice system looks like.”