Two teenagers are under arrest after an off-duty transit police officer spotted one of them firing a gun Friday morning in Queens. 

Authorities said that Sgt. Jason Jansky was driving to work around 10:45 p.m. Friday night when he saw one of the young men fire a gun at the intersection of Beach 84 Street and Rockaway Beach Boulevard. 

The gun was fired at the direction of the nearby Hammels Houses complex, though it didn’t strike anyone. 

Jansky then reportedly got out of the car, identified himself as a police officer and later detained the two boys after a foot chase that lasted about a block. The officer called 911 and kept the two detained until other officers arrived. 

A loaded .22 caliber Jennings semi-automatic handgun was later found in some nearby shrubbery. 

Both Reggie Johnson, the alleged shooter, and Gerard Mosley, were arrested and charged with criminal possession of a weapon, reckless endangerment and tampering with physical evidence. 

Their next court date was not immediately available Saturday