A city police officer will likely be released from the hospital Tuesday after he was hit by friendly fire while responding to a domestic incident on Staten Island, sources tell NY1.

26-year-old officer Amir Pali is recovering at the hospital, where he received a visit from Mayor Bill de Blasio on Monday. Police said he was shot in the stomach by friendly fire during a confrontation with an armed man on Bridge Court near Tompkins Avenue on Sunday night.

Police said 50-year-old Faustino Dioso was intoxicated and threatened officers with a knife, which has a 10-inch blade.

Police said body cam video shows him repeatedly telling officers to "shoot me, shoot me," before lunging at them with a knife. He refused to drop the knife and was shot with a taser, authorities said.

When that failed to subdue him, police said the officers fired their guns at least 10 times, striking and killing Dioso.

Police said he had two prior domestic incident reports, but not at that house or with the people involved this time.

Witnesses said Dioso was the landlord's husband.

The investigation is ongoing.