A Manhattan man with more than two dozen prior arrests was charged over the weekend with pepper spraying a 10-year-old girl and another man while riding the subway, police and the Manhattan District Attorney’s Office said.

The girl’s mom told police they were riding an uptown E train, near the 53rd Street-Lexington stop, around 12:20 p.m. on Saturday when Dasheen Simpkins walked up to her daughter and another man and pepper sprayed them in the face and body, according to a criminal complaint.

The girl and man were randomly targeted by Simpkins, an NYPD spokeswoman. There was no argument or any type of dispute before he fired the pepper spray, she said.

A transit officer later arrested Simpkins, who was found to have a can of pepper spray in his pocket, according to the complaint. Police could not say if he was arrested on the train or near a station.

Simpkins, 24, was charged with attempted assault, criminal possession of a weapon and endangering the welfare of a child, according to the district attorney’s office. He has 25 prior arrests, a police source said.

Bail was set at $30,000, cash or bond, during his arraignment, the district attorney’s office said. He is due back in court on Aug. 11.