The man, Jamaul Tito Perez, 30, also admitted that, in an incident seven months earlier, he threw a pen in the face of a Manchester Memorial Hospital emergency room employee, causing cuts under her eye.

Perez pleaded guilty in Hartford Superior Court to second-degree arson in the apartment fire and assault on a health care worker in the hospital incident.

In accordance with Perez’s plea bargain, Judge Laura F. Baldini sentenced him to three years in prison, followed by five years’ strict special parole.

Perez was being treated [read: drugged – SSRI Stories Ed] for psychiatric problems at the time of the fire.

Lawyer Henry Winiaski, Perez’s conservator, told police after the fire that Perez had been diagnosed with schizoaffective disorder. A separate arrest report indicates that he also suffers from depression, bipolar disorder, and post-traumatic-stress disorder, along with “minimal movement in both wrists.”

The fire in the Grand Prix Apartments at 544 Tolland St. was reported around 10:40 p.m. Sept. 25, 2016.

No injuries were reported, but the fire caused an evacuation of the building. Prosecutor Donna Mambrino said in court Thursday that most of the apartments were occupied at the time.

More than two weeks after the fire, East Hartford Fire Marshal Gloria Stokes and Deputy Fire Marshal Justin Wagner interviewed Perez at the Institute of Living, the Hartford mental hospital where he was a patient, according to an affidavit by East Hartford police Detective Ellen Stoldt.

Perez admitted in the interview that he had set the fire, saying he was trying to harm himself, the detective reported. He said he subsequently pulled a fire alarm outside his apartment because he “felt embarrassed,” the detective added.

Perez explained that he set the fire to “vent out my frustration” about having been removed from a state-run community living program, in which workers come to clients’ homes every day to help with tasks of daily living, the detective reported.

During Perez’s court case, he was found incompetent to stand trial at one point but was later found to have been restored to competency through treatment. A defendant in a criminal case is considered competent for trial only if he can understand the charges against him and assist in his defense.

After Perez was found to have been restored to competency in July, his public defender, Robert J. Meredith, tried to arrange for him to return to the state’s Connecticut Valley Hospital in Middletown to receive further treatment. But the treatment bid ultimately failed, which the defense lawyer attributed to a change in the hospital’s position on the issue.

Before his arrest in the arson, Perez had applied for a pretrial diversionary program in the assault on the Manchester hospital employee, which occurred on Feb. 19, 2016. The assault victim had objected to his application, saying she wanted him to go to jail, Mambrino said in court Thursday.

Prosecutors have subsequently tried unsuccessfully to reach the woman, the prosecutor said. But she noted that Perez’s plea bargain includes a prison sentence, as advocated by the victim.

Mambrino said the incident occurred when Perez was found writing on the emergency room wall with a pen after being discharged. When the employee confronted him, Perez made an obscene gesture at her, then threw the pen in her face, causing the cuts under her eye, the prosecutor said.