One morning last month, a 28-year-old woman was struggling up the stairs at the Dyckman Street elevated station on her way to work. Normally, she would hold her skirt around her legs, but that day she was juggling a cup of coffee, a gym bag and her purse.

She sensed the presence of someone too close to her on the stairs. She turned and saw a man peering into his cellphone. A passer-by confirmed her suspicion: The man had taken photographs under her skirt.

“I said I had to do something,” the woman said on Thursday. “Since he is taking pictures of me, I am going to take pictures of him.”

She said she followed the man onto the southbound No. 1 train, walked through several cars and found him on a seat. She prepared her cellphone camera. He looked at her and mumbled something. “And I told him ‘smile’ because I am going to the police,” she said.