A Queens man was critically wounded early this morning when he was shot by cops after allegedly pointing a gun at them.

Cops say they were responding to a 911 call about an assault at Beach 41st Street Houses at Beach Channel Drive and Beach 41st Street in the Rockaways at around 12:38 a.m. today. When they arrived at the scene, they say they encountered an unidentified 25-year-old wielding a gun in the building's stairwell with another man.

Authorities say the man ran up the stairwell and cops demanded he drop the gun. Instead, the man allegedly pointed his loaded weapon at the four uniformed officers, and one cop shot five rounds at the man, hitting him in the torso. "All I heard was cops chased him and they ran into the building,” the victim's girlfriend, Glory Wilson, 23, told the Daily News. “I heard five shots.”

Witnesses say the suspect was attending a party in the building and had stepped outside for a minute before the cops confronted him. His mother, who witnesses say is unwell, was reportedly transported out of the building on a stretcher soon after the man was shot.

The suspect was taken to Jamaica Hospital, where he is listed in critical condition; two other officers were treated at area hospitals for minor injuries.