A man, who was in possession of a loaded firearm, was shot by a police officer Thursday night in Queens, according to the NYPD.

Uniformed members of the 101 Precinct neighborhood safety team, one sergeant and two officers, were conducting an investigation inside the lobby at at the 439 Beach 56 St. around 8 p.m., Chief of Patrol John Chell said.

Two males ran away as the officers approached the lobby, he said.

One man was apprehended right away and was placed under arrest for narcotics.

The second man was stopped on Beach 56th Street and Beach Channel Drive, where "a violent struggle ensues," Chell said.

The officer discharged a firearm, which hit the suspect, who was in possession of a loaded 40-caliber semi-automatic firearm, he added. Authorities said they do not believe the suspect fired his weapon.

According to the NYPD, the man was rushed to Jamaica Hospital and the investigation is ongoing.

Police did not give the condition of the man.