A serial subway masturbator who has been repeatedly spotted touching himself while sucking his thumb in the city’s transit system has been nabbed.

James Hunt — one of the worst in the dirty dozen transit deviants profiled by The Post in March — was chased down and tased after resisting arrest around 8:30 Saturday morning at the Court Street Station in Brooklyn, according to police.

The 41-year-old creep, who is well-known to police, ran from cops after being spotted masturbating outside the MTA booth at the station.

Cops also connected the perv to another incident from June 11 when a 44-year-old walked into the station and saw Hunt masturbating on the mezzanine, according to cops. The woman even snapped a picture of the gross act.

The head of Transit’s Special Victims Division Sgt. Chris O’Connell said combatting serial subway sex crime offenders has been an “uphill battle” for police in the city.

“We are seeing them constantly going back and doing the same thing over,” O’Connell said.

Saturday’s incident brings Hunt subway sex crimes tally to more than 28 in the last decade.

He added that these “gross, disgusting experiences” are especially troubling when the victims are underage.

“It’s terrifying for anyone, especially younger victims,” O’Connell said. “No one should have to deal with something like this going back and forth from school or work.”

Hunt faces charges of resisting arrest and public lewdness from Saturday’s arrest and another public lewdness count from the June incident.