The off-duty cop who was shot in the head in Brooklyn over the weekend has died, the NYPD said Tuesday evening.

Authorities said Adeed Fayaz, 26, died on Tuesday after being hospitalized since a Facebook Marketplace transaction went wrong on Ruby Street in East New York on Saturday night. The officer and his brother-in-law were attempting to buy a $24,000 Honda Pilot advertised on the site when a suspect, later identified as 38-year-old Randy Jones, allegedly pointed a gun at the officer's head and demanded cash, police said.

The off-duty officer had shaken himself free, but Jones opened fire, cops said, striking Fayaz in the head. The brother-in-law grabbed Fayaz's gun and fired at the man, who jumped into a black car and sped off, officials said.

Jones, 38, was apprehended Monday at a Days Inn in Rockland County, after hiding out with his girlfriend and five children, NYPD Commissioner Keechant Sewell said.

On Wednesday afternoon, Jones was arraigned on murder, attempted robbery and weapons charges in Brooklyn Criminal Court and remanded without bail, according to Oren Yaniv, a spokesperson for the Brooklyn District Attorney's office.

Redmond Haskins, a spokesperson for the Legal Aid Society, urged members of the public to avoid rushing to judgment of Jones, who is presumed innocent until proven guilty in a court of law.

“Defense counsel is still awaiting initial discovery from the District Attorney’s office, and we have not yet received any evidence linking Mr. Jones to the offense,” Haskins said. “We will have more to say about this case in the coming days, weeks and months after a thorough review and investigation.”

Mayor Eric Adams referred to the perpetrator as a "coward" in a statement on Twitter honoring the fallen officer.

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

Gwynne Hogan contributed reporting.