ROCHESTER, N.Y. -- An Irondequoit police officer is facing federal charges for allegedly cyber stalking his ex-girlfriend.

William Robert Rosica, 50, of Irondequoit, was arrested and charged with stalking and unlawful access to a protected computer.

According to the criminal complaint, Rosica's ex-girlfriend decided to end their three year relationship in February 2016.

According to assistant United States attorney Melissa Marangola, who is handling the case, Rosica set out on a nearly year-long campaign to harass and torment the woman. She says between March 2016 and February 2017, Rosica targeted her with a barrage of harassing text messages, phone calls and emails.

The complaint states that her work email and online medical system had a number of unauthorized access attempts. Additionally, Rosica is accused of targeting the victim's ex-husband and coworkers.

Irondequoit Town Supervisor and Police Chief Richard Tantalo released a joint statement Thursday, saying:

"Public officials, including our sworn police officers, must be held to a higher ethical and moral standard. However, the conduct outlined in the complaint is offensive and abusive by any means of assessment."

Rosica appeared in court Thursday morning and his being held pending a detention hearing on Friday at 10:30 a.m.

If found guilty, Rosica faces a maximum penalty of five years in prison and a $250,000 fine.