MANHATTAN — A straphanger was arrested for inappropriately pressing himself against a plainclothes police officer Wednesday, NYPD officials said.

Javier Monroy, 39, was aboard the southbound 5 train when an NYPD sergeant and female officer on patrol got onto the train at Grand Central Terminal about 5:40 p.m., police said.

As the train hurtled downtown, the police officer felt Monroy "push his groin up against [her] hip and thigh," according to the criminal complaint.

She put her arm out to keep him away, NYPD officials said.

Once they reached Union Square, the officer told her team what had happened. They stopped the train from leaving the station and arrested Monroy, police said.

Monroy, of Gravesend, was arraigned on Thursday and charged with forcible touching and sexual abuse, according to court documents.

His bail was set at $1,000 cash. Monroy's lawyer declined to comment.