ROCKLAND — A 55-year-old Rockland woman was sentenced Thursday for setting fire to the home she and her ex-husband owned.

Elizabeth M. Cole pleaded no contest to arson during a hearing in Knox County Unified Court and was sentenced to five years in jail with all but 90 days suspended. She also has been placed on probation for the next four years and is barred from possessing any incendiary devices, including matches and lighters.

A plea of no contest results in a conviction but allows the defendant to not admit to the crime.

Cole must pay restitution of $21,000 to her ex-husband, who also owned the house at 29 James St., which was severely damaged by the fire Cole set on the night of Aug. 31.

Knox County Assistant District Attorney Jeffrey Baroody said the sentence balanced the significant crime Cole committed with the mitigating psychological issues that affected her state of mind. As part of her sentence, Cole was ordered to take any medication prescribed to her.

Cole has already served 90 days in jail since being arrested on Oct. 3 after an investigation by the State Fire Marshal’s Office.

Firefighters and police who responded to the fire found Cole outside on the back porch. They had to forcibly remove her from the house. Cole said she wanted to die in the fire, according to a court affidavit filed by an investigator. A lighter was found on the porch with her.

Cole told an investigator at Pen Bay Medical Center in Rockport, where she was taken that night, that she had poured gasoline in the living room and set it ablaze with a lighter, according to the affidavit. Cole was emotional and told the investigator that she had been married in the house and would die in the house.

Cole and her ex-husband divorced in March, and the divorce decree required the house be put up for sale no later than Jan. 21, 2017. Cole had told a neighbor that her former husband wanted her to sell the house and she was concerned where she would live. According to the neighbor, Cole said the house was a “forever home” and she did not intend to leave but would die in it.

According to the affidavit, Cole had been drinking heavily the evening before the fire.

The couple have owned the two-story house, assessed at $103,000, since 1991.

Damage from the fire was largely contained to the downstairs living room. There also was some smoke and water damage.