HAGERSTOWN, Md. (AP) — A man who prosecutors say lit a fire to stay warm in a vacant building he was squatting in has pleaded guilty to fourth-degree burglary and failing to notify the fire department.

Ernest Stitely, 27, entered the plea Thursday in Washington County Circuit Court in Hagerstown. He was sentenced to six months in jail and ordered to pay the Hagerstown Fire Department nearly $6,500 in restitution.

READ MORE: Man Arrested For Deadly Shooting In Baltimore County, Police Say

The Herald-Mail of Hagerstown reports that prosecutors say on Feb. 7, Stitely lighted the fire in a bathtub and left it unattended.

READ MORE: Baltimore County Detectives Need Help Solving 2009 Murder Of Towson University Student

Sixty-six emergency personnel responded to the two-alarm fire.

Stitely’s lawyer said Stitely eventually came forward and admitted to starting the fire, although it was never his intention to cause damage.

MORE NEWS: Rich Strike Yes, Preakness Champ Early Voting No For Belmont

(Copyright 2013 by The Associated Press. All Rights Reserved.)