Police said an off-duty officer was attacked as she left a Dunkin’ Donuts in Harlem on Jan. 21, 2015. (credit: Ilana Gold/CBS2)

NEW YORK (CBSNewYork) – A man is in custody after police said he randomly attacked an off-duty NYPD officer in Harlem Wednesday morning.

The incident took place around 6:50 a.m. at 125th Street and Lenox Avenue.

Investigators said the plainclothes sergeant, 43, had just gotten out of the subway and was on her way to work when she went into a nearby Dunkin’ Donuts.