Two men were arrested and charged Thursday night following a police-involved shooting that took place on Staten Island early that morning, the NYPD said.

Patrick Allen, 24, and Jonathan Derbyshire, 25, were spotted by a uniformed sergeant and officer responding to a call about gunshots on Androvette Street, near Arthur Kill Road, at about 1:10 a.m., police said.

As police approached, Derbyshire took off into the woods, police said. Allen, who was wearing a heavy ballistic vest, then pointed a 9 mm Glock 26 at the officers, police said. 

The officers fired at Allen, hitting him three times in the leg and once in the arm, NYPD Assistant Chief Edward Delatorre said. He was taken to Staten Island University Hospital in stable condition. The 9 mm was recovered at the scene, police said.

Allen and Derbyshire were both charged with attempted assault on a police officer with a deadly weapon, among other charges. Allen was also charged with attempted murder. 

Police had been searching for Derbyshire since the incident and said early Thursday they considered him “armed and dangerous” after they recovered an AR 15 semi-automatic rifle and a hunting knife they believe he dropped in the woods. He was later taken into police custody.

“It appears at this time — it’s still under investigation — that they were hanging out in a house near the location and went out into the wooded area to test-fire some guns,” NYPD chief of patrol Terence Monahan told reporters Thursday after the swearing in of a class of new recruits at the police academy.

The sergeant and officer were not seriously injured in the shootout, police said.

Allen and Derbyshire have what a law enforcement source described as minor arrest records.

This is the third police-involved shooting this week. Police fatally shot two men in separate incidents in Brooklyn on Tuesday night and early Wednesday morning.

With Newsday