NEW YORK — Richard A. Brown, a longtime New York City prosecutor and former judge who presided over the arraignment of “Son of Sam” killer David Berkowitz, announced Thursday he is resigning due to poor health.

The 86-year-old Democrat, who has Parkinson’s disease, said he has designated his chief assistant, John Ryan, to exercise his duties until his official resignation on June 1, “the twenty-eighth anniversary of my first assuming this office.” He said he will “continue to work closely with my staff” for an orderly transition.

He had announced in January he planned to retire at the end of the year. “It had been my hope that I would be able to finish out this term in office. Unfortunately, that is not to be,” Brown said in a statement.

Brown ran unopposed six times and became the borough’s longest-serving district attorney, but he would have faced competition this time around. The borough president, a city councilman and a former judge were already jockeying for the job before his January announcement.

Brown was never a prosecutor until former Gov. Mario Cuomo picked him from 14 candidates to replace retiring DA John Santucci.

His tenure has tracked with a precipitous drop in crime in New York City and shifts in how police and prosecutors combat crime. In 1991, there were more than 2,100 homicides in the city. Last year, there were fewer than 300.

Years before a shooting in Ferguson, Missouri, shone a spotlight on police killing unarmed black men, Brown pursued criminal charges against three detectives in the 2006 death of Sean Bell, who was fatally shot by police leaving a nightclub the morning of his planned wedding. They were acquitted by a judge, but the police department fired them.

Critics have knocked Brown as a relic of a tough-on-crime era that saw scores of mostly poor minorities put behind bars for low-level quality-of-life offenses. Last fall, protesters chanted “Take Down Dick Brown” as they rallied at a Queens courthouse against what they called his “uniquely punitive policies.”

Brown worked for the state Assembly and was former Mayor John Lindsay’s legislative representative in Albany before being appointed as a criminal court judge in 1973.

He served on the bench for 18 years, interrupting his tenure in 1979 to serve as Gov. Hugh Carey’s chief legal adviser. He returned to the courtroom in 1981 and is still widely known in legal circles as “Judge Brown.”

On his first day as a judge, a defendant pulled out a gun and started shooting in the courtroom. Brown saved himself by dropping to the floor behind his bench. The episode earned him the nickname “Duck Down Brown.”

Brown presided over Berkowitz’s arraignment in 1977 under heavy security and intense public interest. He ordered the then-24-year-old postal worker to undergo psychiatric testing and said that he should be jailed under maximum security conditions, away from other inmates.

“I remember the courtroom was packed to the rafters,” Brown told The Associated Press in 2017. “It was almost like the air was taken out of the room when he walked in.”

Berkowitz, who called himself “Son of Sam,” set the city on edge with late-night shootings that killed six people and wounded seven. He primarily targeted young women sitting in cars before his arrest Aug. 10, 1977.

He is currently serving a life sentence. He says he is a born-again Christian and is “very sorry for what happened.”