BROOKLYN (PIX11) — An NYPD officer died on Tuesday, days after he was shot in the head while off duty in Brooklyn, Police Commissioner Keechant Sewell said.

Adeed Fayaz, a five-year veteran of the department, was critically injured Saturday during an attempted robbery. He spent days in the hospital fighting for his life.

“Police Officer Adeed Fayaz was a father, a husband, a son, and a protector of our great city. Officer Fayaz was shot Saturday night and he tragically succumbed to his injuries today,” Sewell said. “Our Department deeply mourns his passing, and his family and loved ones are in our prayers.”

NYPD officers lined up outside of Brookdale Hospital on Tuesday night.

Mayor Eric Adams earlier on Tuesday said he was hopeful the 26-year-old officer would pull through. He mourned the officer’s death hours later.

“Officer Adeed Fayaz dedicated his life to keeping his city safe. We lost him to a coward’s bullet, but his love for his fellow New Yorkers will endure. His death is a tragedy,” Adams said. “Join me in keeping his family, friends, and brothers and sisters in the NYPD in your hearts tonight.”

Police arrested Randy Jones, 38, in connection with the shooting. Fayaz and his brother-in-law met with Jones on Ruby Street in East New York just before 7 p.m. on Saturday, according to NYPD Chief of Detectives James Essig. They were there to buy a Honda Pilot advertised on Facebook Marketplace.

Jones allegedly grabbed Fayaz and put him in a headlock before pointing a gun at his head and demanding money, Essig said. Fayaz said he didn’t have the cash.

Jones then allegedly pointed the gun at the brother-in-law before Fayaz broke free, according to Essig. Jones then shot Fayaz in the head and continued to fire at the two men while fleeing the scene, according to the NYPD.

Police found Jones, along with his girlfriend and five of her children, at a hotel in Spring Valley.

Jones was charged with murder and attempted robbery.