District Attorney Marianne Lynch says Gary Green pleaded guilty Tuesday morning to criminal threatening and terrorizing.
Officials say a third count against Green, refusing to submit to arrest, was dismissed.
Green was arrested after causing a two-hour stand off at the Village Green Motel on October 4.
Authorities say he was armed with a fake, plastic gun that looked like an AK-47 assault rifle and also made threats to shoot police.
He was sentenced to 60 days in the Penobscot County Jail with credit for time served.