An off-duty NYPD officer shot and killed a man in Manhattan who police said flashed a gun at him Sunday night — the second fatal NYPD shooting since Friday.

Sunday’s incident happened around 9:45 p.m. near West 173rd Street and Amsterdam Avenue in Washington Heights, according to police officials. Deputy Chief Eric Pagan said the officer was standing outside a residential building when he was approached by two men on two mopeds. One of the men got off his moped and asked the officer if he knew a certain person’s name, and then pulled out a gun, according to Pagan.

When the officer saw this, he took out his own gun and fired, striking the man several times, the deputy chief said at a press briefing early Monday. The other man fled the scene on his moped, officials said.

Police said first responders initiated CPR on the man whom the officer shot, and took him to Harlem Hospital, where he was pronounced dead. Pagan said he was 30 years old, but officials have not yet identified him as they work to notify his family.

Officers recovered a 9mm loaded gun at the scene, according to the NYPD. The officer was also taken to a local hospital for minor injuries.

The police shooting follows a similar confrontation Friday night on Staten Island, where officials said off-duty officers spotted a man with what appeared to be a real gun behind a diner on Hylan Boulevard in Great Kills. Assistant Chief Melissa Eger said the officers approached the man and told him to drop the weapon, but he did not, and pointed it toward the officers.

Eger said one of the officers then opened fire and struck the man, whom police later identified as 44-year-old Staten Island resident Jesse Campbell. He was taken to Staten Island University Hospital and pronounced dead. Eger said the incident was captured on surveillance video.

Police recovered a fake gun at the scene, according to the assistant chief. She told reporters Campbell had a “documented criminal history in New York,” but did not provide details. “Our officers were confronted with a dangerous and unpredictable situation, and they attempted to de-escalate the situation multiple times,” she said.

The NYPD’s force investigation division was reviewing both police shootings, officials said.

This is a developing story based on preliminary information from police and may be updated.