A New Jersey police officer has admitted to having sex with two teenage girls while he was on duty.

Suspended Rockaway Township police officer Wilfredo Guzman pleaded guilty on Thursday in Morristown to two counts of official misconduct. The Daily Record reports he agreed to forfeit his law enforcement job and will never seek public employment again.

Morris County Assistant Prosecutor Laura Magnone recommended Guzman be sentenced to seven years in state prison on July 27.

The alleged assaults occurred in 2014 and 2015 in his patrol car, at a motel and at a police substation at the Rockaway Townsquare mall. Authorities say one girl was between 16 and 17 at the time, while the other was 15.

Prosecutors say the 45-year-old man provided both girls with alcohol and prescription medication in exchange for sex, but he did not admit to that Thursday.

Guzman was a Rockaway Township cop since 2013. He was indicted in November.

NJ Advance Media staff writer Justin Zaremba contributed to this report.