REDWOOD CITY (CBS SF) — A 20-year-old woman pleaded no contest Monday to setting her ex-boyfriend’s bed on fire while he was sleeping in 2012, San Mateo County prosecutors said Tuesday.

Jacqueline Rivera agreed to plead no contest to felony arson and assault charges after prosecutors and the court indicated she would receive a sentence of no more than five years in prison for the attack in San Mateo on April 26, 2012.

READ MORE: BART Ridership Nears Pre-Pandemic Level Monday as Hours Expand

The night before, Rivera, then 18, went to her 21-year-old ex-boyfriend’s home to talk about their relationship. It had ended because Rivera believed that he had cheated on her and he refused to discuss it that day, according to prosecutors.

At about 3 a.m., he awoke to find his bed on fire. His father heard him screaming and put the fire out with a garden hose, prosecutors said.

The victim suffered burns to his hands and arms, but neither he nor his father called police.

READ MORE: Dixie Fire: Thundershowers, Downdrafts Whip Up Flames; Ash Fall 'Looks Like It's Snowing In Quincy'

Two weeks later, a friend of Rivera’s got in touch with him via text message and told him that Rivera had confessed to sneaking into his bedroom and setting him on fire. The friend then contacted police, prosecutors said.

Rivera was arrested and initially pleaded not guilty to the charges. She was found mentally unfit to stand trial and spent the past two years in a psychiatric facility.

In May, she was found to have been restored to mental competency and criminal proceedings resumed, leading to Monday’s plea in the courtroom of San Mateo County Superior Court Judge Jonathan Karesh.

MORE NEWS: Dramatic Pursuit Video: Brazen Driver Attempts To Elude Arrest By Driving Wrong Way; Two Attempted Carjackings

She remains in the psychiatric facility and is scheduled to be sentenced on Oct. 16, prosecutors said.