The gunman accused of shooting two police officers, one fatally, in Harlem Friday night has died of his injuries, police said.

LaShawn McNeil, 47, was pronounced dead at Harlem Hospital on Monday afternoon, three days after allegedly opening fire on a group of officers who were responding to a domestic disturbance reported by his mother.

When police arrived, McNeil allegedly used a handgun to fire at the officers from behind his bedroom door without warning, killing rookie cop Jason Rivera, 22, and gravely wounding 27-year-old Wilbert Mora.

As he tried to flee the scene, McNeil was shot in the head and the arm by a third officer, police said. He received emergency surgery on Friday night, but did not speak with police, according to an NYPD official.

McNeil, a resident of Baltimore, was believed to be in New York to help his mother with a medical procedure. He had had four previous arrests for gun and drug possession outside the city. Police said the gun McNeil used to kill Rivera and wound Mora had been stolen in 2017 and was registered in Baltimore.

At a press conference on Monday announcing a new plan to stop gun violence, Mayor Eric Adams said that investigators learned McNeil also had a loaded assault rifle under his bed.

Attempts to reach McNeil’s family were not immediately successful.