The criminal-justice reforms that must be made if this is ever to be a nation “with liberty and justice for all” will require the election of a new generation of prosecutors who understand the need to upset a broken and dysfunctional status quo.

Kings County District Attorney Ken Thompson, the chief prosecutor for the New York City borough of Brooklyn, set out to be such a prosecutor. After his election in 2013, observed The New York Times, he “earned a reputation in office as one of the country’s most progressive district attorneys.”

Tragically, Thompson’s tenure ended Sunday, when he lost a battle with cancer at age 50. The district attorney’s chief assistant, Eric Gonzalez, hailed his colleague as a visionary reformer who “transformed the office into a model urban prosecutor’s office with a mandate to do justice and treat everyone and every case fairly and with the utmost integrity.”

That was precisely what Thompson had promised to do during the 2013 campaign that led to his election to one of the most powerful law enforcement positions in the United States.

Across the United States, voters choose roughly 2,400 prosecutors in partisan and nonpartisan elections. The nation’s states attorneys, county prosecutors, and district attorneys are overwhelmingly white and overwhelmingly male; only a handful of them identify in any serious sense as criminal-justice reformers.

When Thompson mounted his bid in Brooklyn, he made it clear that he wanted to be a different kind of district attorney.

Thompson ran that race as a civil-rights advocate with a reputation for battling injustice. That reputation was established when, as federal prosecutor in the Eastern District of New York, he prosecuted former New York City police officer Justin Volpe for the 1997 beating and torture of Haitian immigrant Abner Louima.

In addition to fighting contemporary injustices, Thompson sought to address the injustices of the past. With his client Louisiana filmmaker Keith Beauchamp, and a coalition of religious leaders, the lawyer worked with New York Senator Charles Schumer and New York Congresswoman Yvette Clarke to convince the United States Department of Justice to reopen the investigation into the 1955 murder of 14-year-old Emmett Till in Mississippi.

Thompson’s record of battling for civil rights and social justice made him a serious Democratic primary challenger to Brooklyn District Attorney Charles Hynes. Yet there were plenty of political pros who bet on Hynes—a multi-term incumbent whose name had for decades been associated with the tough-on-crime posturing favored by many urban prosecutors.

The challenger gained the upper hand with a campaign that focused on the need for criminal-justice reform in a borough where there was broad concern about the city’s stop-and-frisk law in particular and policing in general.

Thompson earned particular notice for promising to end criminal prosecutions of people arrested with small amounts of marijuana. “Too many young people are being arrested for low-level drug charges that leave a permanent stain on their records for what should be a violation,” said Thompson. “I will not shrug my shoulders in the face of injustice.”

That message struck a chord in the multi-racial, multi-ethnic borough, which has a population of 2.5 million. Thompson beat the 20-year incumbent in the primary and went on to win 75 percent of the vote on the same day that saw the election of progressives Bill de Blasio as mayor and Tish James as public advocate.

Thompson’s election was heralded as historic. He was the first challenger to defeat a Brooklyn district attorney in more than a century, and the first African-American ever to serve as the borough’s district attorney.

But the real history was made after Thompson’s election.

The new district attorney ordered a halt to prosecutions of low-level marijuana arrests, announcing that the change would spare young Brooklynites from “the burden of a criminal record.” He also argued that the office’s time and resources could be better used to combat gun crimes and domestic violence.

At the same time, Thompson empowered a Conviction Review Unit in the DA’s office, assigning aides to review dubious convictions from the past. Eventually, the district attorney arranged to vacate or dismiss the convictions of 21 people who had been wrongly convicted.

Describing Thompson’s role in the burgeoning exonerations movement, Karen Daniel, the director of the Center on Wrongful Convictions at Northwestern University, told NBC: “You can’t possibly overstate it.”

She hailed the Conviction Review Unit as “the gold standard” for the pursuit of justice.

Thompson took that pursuit seriously.

“As Brooklyn district attorney, my primary duty is to do justice,” he told CNN earlier this year, after the exoneration of Paul Gatling, an 81-year-old man who had been convicted more than 50 years earlier on charges stemming from a murder case. “That means to protect the people of Brooklyn but also to make sure that our criminal justice system is based on fundamental fairness. Having innocent people in prison for murders and other crimes that they did not commit is not justice.”

Thompson also established an Immigrant Fraud Unit, “to protect immigrants in Brooklyn who are often ripped off and exploited by fake lawyers and scam artists,” as well as a Labor Frauds Unit “to protect hardworking employees and honest employers.”

Those moves earned Thompson national attention as an ambitious and determined reformer, even as Brooklyn activists pressed him to do more.

Thompson wanted to do more. He had a vision that was only beginning to be realized. That is part of what makes his death such a profound loss for New York and the nation, as Mayor Bill de Blasio and his wife, Chirlane McCray, have noted.

“With a life and promise cut far too short,” they explained, “our city was blessed with but a glimpse of Ken’s unwavering commitment to justice and his unrivaled pursuit of a more fair system for all those he served.”