ROCKLAND, Maine — A St. George man could serve up to 21 days in jail after admitting he broke into his neighbor’s home at night to make sexual advances.

Nicholas S. Lunt, 27, pleaded guilty Wednesday in Knox County Superior Court to burglary, criminal trespass and harassment by electronic device. Under terms of a deferred disposition, if Lunt adheres to conditions over the next 12 months that include no further criminal conduct and no contact with the victim, the burglary charge will be dismissed.

In one year, if he abides by the conditions, Lunt will be sentenced to 180 days in jail with all but up 21 days suspended. The defense will be able to argue for less jail time at the sentencing hearing. Under the agreement, he also will be sentenced to serve probation for two years with a condition that he have no contact with the woman.

If Lunt fails to meet the conditions, he will be sentenced on all three charges, including the burglary.

Assistant District Attorney Jeffrey Baroody said Lunt sent texts to the woman expressing interest in her and that at 2 a.m. Thursday, Dec. 4, broke into the home, using a credit card to unlock a door. The woman convinced him to leave and there was no assault. He texted an apology to her the following day.

Defense attorney Eric “Rick” Morse said his client was extremely intoxicated. The woman was a sister of a friend, and he was acquainted with her, he told the court.