Correction: A previous version of this story misstated Det. Troy Patterson’s medical diagnosis. The story has been updated.

NEW YORK (PIX11) — An NYPD officer who spent more than three decades in a vegetative state after he was injured in a Brooklyn shooting died over the weekend, officials said.

“The NYPD mourns his loss and extends our continued support to his family & friends,” NYPD Commissioner Keechant Sewell said in a tweet.

Det. Troy Patterson was off-duty in 1990 when three suspects tried to rob him in Brooklyn, according to the Detectives’ Endowment Association. The officer was shot during the incident and spent 33 years in a vegetative state, according to his son, who spoke with PIX11 News on Monday. He passed away on Saturday, officials said.

“Detective Troy Patterson was a hero of New York City, who inspired hundreds of fellow Detectives to continue his courageous, important crime-fighting work. Troy’s legacy will forever be one of service and sacrifice,” the DEA said in a tweet.