NYPD detectives collared a level-3 sex offender with a lengthy rap sheet on Thursday who allegedly exposed himself on a Brooklyn train, authorities said.
 
A straphanger took a picture of Confesor Pagan, 62, touching himself on a southbound D train at the Bay Parkway subway station about 4:35 p.m. Aug. 15, cops said.
 
Pagan has been arrested 53 times, and convicted for forcible touching, records show.
 
He was tracked through the warrant squad to a Coney Island apartment, and arrested about 10:15 a.m. Thursday.
 
Level 3 sex offenders have a high risk of repeat offense and are considered a threat to public safety, according to the New York State Division of Criminal Justice Services.