WEST SENECA, N.Y. — A West Seneca police officer accused of having an on-duty sexual encounter with a victim of domestic violence pleaded guilty Thursday and resigned from the police department.

Derek Vazquez, 35, pleaded guilty in Elma Town Court to one count of official misconduct. He told Town Justice Robert Pierce that he submitted his letter of resignation to the West Seneca Police Department.

According to the Erie County District Attorney’s Office, Vazquez had an on-duty sexual encounter with a victim of domestic violence in January 2019. He had previous contact with the victim after filing a domestic violence report for her in the weeks prior, according to the DA’s office.

The DA said Vasquez went to the home of the victim for no other purposes other than a sexual encounter. He was not dispatched to the location for an official call, the DA said.

Outside the court, Vasquez and his attorney, Patrick Brown, both declined to comment on the plea.

On Jan. 24, the case moved from West Seneca Town Court to Elma Town Court after both West Seneca justices recused themselves. Elma Town Justice Pierce barred cameras from the courtroom.

A spokeswoman for DA John J. Flynn Jr. said the case would be transferred to the Buffalo Veterans Treatment Court, as Vasquez is an Army veteran. Upon completion of a program in veterans court, Vasquez’s charge — he originally faced up to a year in jail — could be reduced to disorderly conduct.