A Shrewsbury police officer will resign his post as part of a plea deal to settle off-duty assault and trespassing charges filed earlier this year, the Monmouth County Prosecutor Christopher Gramiccioni said Tuesday.

Patrolman Ryan Cullinane, 27, of Tinton Falls, will also forfeit his weapons and firearms ID cards after pleading guilty to trespassing on the property of a borough resident, according to a prepared statement from Gramiccioni’s office.

According to media reports in February, Cullinane showed up unwanted at the home of an unidentified woman two days in a row, and punched an unidentified man in the face in one encounter. He faced charges of harassment, trespassing and simple assault.

On Tuesday, Cullinane pleaded guilty to fourth-degree trespass before Monmouth County Superior Court Judge Vincent N. Falcetano, Jr., and “admitted that while off-duty he was trespassing when he was found at the residence of a borough resident uninvited and refusing to leave,” the prosecutor’s statement said.

As part of the plea agreement, which was “derived after consultation with the victim,” Cullinane is to have no contact with the victim contact and is prohibited from returning to scene of his crime, the statement said.

“Cullinane faces up to 18 months in state prison but is expected to apply to the Pre-Trial Intervention Program,” the statement said.