A teenager from an affluent harbourside suburb has allegedly flashed a pistol on a Sydney train after another passenger confronted him about his rowdy behaviour.
A male passenger watched the 16-year-old trying to force his way into the unoccupied rear driver's cabin of a city circle train on Monday night, NSW Police said in a statement.
The man confronted the teenager who allegedly lifted his shirt to reveal a gun tucked into his waistband.
The alarmed passenger got off the train at Museum Station and called authorities.
Police investigations led them to a home in Mosman on Sydney's north shore where the teenager was arrested on Thursday afternoon.
An image of the black Galaxy pistol was released by police on Friday.
The manufacturer lists the weapon as a metal airsoft pistol, which shoots pellets.
AAP unerstands airsoft pistols are classified as firearms by NSW Police.
Ballistic testing will be carried out on the gun.
The teenager was charged with possessing an unauthorised firearm, being armed with intent to commit an indictable offence and trying to enter the train's crew compartment.
He was granted conditional bail to appear at a children's court in mid-May.