Police say a man sexually abused a female plainclothes officer in a crowded subway car Wednesday.

The attack happened after a team of plainclothes officers on the transit anti-crime unit boarded a southbound 5 train at the Grand Central Terminal station just before 6 p.m., the NYPD said.

As the train was making its way towards Union Square, police say a 39-year-old man approached one of the female officers, brushed up against her left hip and pressed his groin against her.

The officer put her arm out to keep the man away, and when she got off at Union Square, she noticed the man had an erection, according to authorities.

The officers stopped the man, identified as Javier Monroy of Brooklyn, from leaving the station and took him into custody, the NYPD said.

Monroy is charged with forcible touching and sexual abuse. It wasn’t clear if he had an attorney.

[NATL] Top News Photos: Pope Visits Japan, and More