BISMARCK, N.D. (AP) — A former deputy U.S. marshal in North Dakota has been sentenced to three years in prison for spying on young women in Bismarck dressing rooms.

Michael Rivera, 30, was convicted in February of misdemeanors that included surreptitious intrusion and creating and attempting to create sexually expressive images. He was found not guilty of more serious felony charges.

Rivera was sentenced in state court on Tuesday and ordered to get sex offender treatment while in prison.

“I violated a norm of our society, but I am not that same person,” Rivera said. “I understand there may be people here who have ill feelings towards me, but above all, I ask for the forgiveness of the victims. I am not the same person that I was.”

Investigators allege Rivera secretly recorded girls and young women as they tried on clothes in dressing rooms from the summer of 2015 to 2016. He was caught peeping on a 15-year-old girl, who saw his phone peering beneath her fitting room door at a Target store.

Authorities who searched his computer and electronic devices determined he took similar actions at several other Bismarck stores. He was sentenced in May in federal court to seven years in prison on child pornography charges, and he’ll serve the federal sentence first.

Two young women who were peeped on said at the hearing that they now often feel uncomfortable when a man is looking at them and fear going into dressing rooms.

“I don’t know how to go into a dressing room again without feeling violated,” one of the minor victims said.

The girls said they felt cheated because Rivera was acquitted on 11 felony counts that corresponded to his recording of minors.