Police arrested a Brooklyn man who allegedly tried to rape a woman on a Brooklyn subway train early Thursday morning, authorities said.

Daniel Jean-Pierre, 37, was hit with attempted rape, robbery, and sexual abuse charges in connection to the attack, police said.

Jean-Pierre allegedly attacked the 27-year-old woman after she got on to a Manhattan-bound No. 4 train at about 1:15 a.m. on Thursday, cops said.

During the attack, Jean-Pierre pulled the woman’s pants and underwear down and sexually assaulted her with his hands, cops said.

He then held her hands down and robbed her of money and a pair of headphones, police said.

When the train arrived in the next station, he ran off and jumped onto the track to get away.

Jean-Pierre was being held at a Brooklyn police precinct Friday night.