An FDNY firefighter was arrested Thursday for taking pictures up a woman’s dress with a cellphone, cops said.

Gary Pandolfino was called out by a good Samaritan around 9 p.m. after snapping pics of the woman who was riding up the escalator in front of him at the Lexington Avenue/59th Street station, police said.

After being caught mid-snap, the 46-year-old pervert took off, broke his phone and tried to stash the pieces in a nearby trash can and the gutter, cops said.

The do-gooder followed Pandolfino and recovered one of the pieces of the cellphone, then gave it to the cops arresting Pandolfino, police said.

He was charged with unlawful surveillance, a felony.

An FDNY spokesperson said Pandolfino has 17 years on the job and is assigned to Manhattan. He faces suspension pending his arraignment Friday.

Additional reporting by Gabrielle Fonrouge