NEW YORK — Brooklyn District Attorney Ken Thompson died Sunday after battling cancer.

"With a heavy heart, the family of Brooklyn District Attorney Ken Thompson announced that the District Attorney passed away today after a hard fought battle with cancer," a statement read Sunday night.

Thompson announced just days prior that he had been diagnosed with cancer but would not be stepping down from his position.

"Recently, I was diagnosed with cancer. As a man of intense faith, I intend to fight and win the battle against this disease," Thompson said in a statement on Oct. 4. "I humbly seek your sincere prayers as I confront this challenge and respectfully ask that you honor my family’s need and wish for privacy during this time."

Thompson was sworn into his position in 2014. He was the borough's first African-American District Attorney in 2013.

He established a Conviction Review Unit which moved to vacate or support the dismissal of 21 people wrongfully convicted of murder or other offenses.

Local politicians and community advocates took to social media Sunday to mourn Thompson.

“I am profoundly saddened to learn of the sudden passing of Brooklyn District Attorney Ken Thompson after a battle with cancer," said Gov. Andrew Cuomo. "Ken was a dedicated public servant who embodied the highest principles of the law, and his grand presence will be sorely missed."

"From the minute I met Brooklyn District Attorney Ken Thompson, I was amazed at his compassion for people, his desire for fairness for all, and his love for Brooklyn," said Brooklyn Chamber President and CEO Carlo A. Scissura. "We offer our deepest condolences to his wife, children and family. May God watch over him."

View this post on Instagram

I’m very sad to hear about the passing of Brooklyn District Attorney Ken Thompson this evening. He was a good man, and a good friend, and this city will miss him greatly. Rest in peace, Ken. #Bronx #bronxbp #nyc #brooklyn

A post shared by Ruben Diaz Jr (@ruben_diaz_jr) on Oct 9, 2016 at 5:08pm PDT

Deeply saddened at the news of the passing of Ken Thompson. He had Thurgood Marshall like passion for justice. RIP. pic.twitter.com/mtxmDae0V4 — Reverend Al Sharpton (@TheRevAl) October 9, 2016

We extend our deepest condolences to the family of @BrooklynDA Ken Thompson. A leader, gentleman, & friend, he will be sorely missed. — NYPD 61st Precinct (@NYPD61Pct) October 10, 2016

Thompson was 50 years old.