HARRISBURG, Pa. (AP) — A man who scaled an iron security fence in the middle of the night, eluded police and used beer bottles filled with gasoline to ignite the occupied Pennsylvania governor’s mansion pleaded guilty Tuesday to attempted murder and other charges. Cody Balmer, 38, also entered pleas to terrorism, 22 counts of arson, aggravated arson, burglary, aggravated assault of Gov. Josh Shapiro, 21 counts of reckless endangerment and loitering in the April 13 attack that did millions of dollars in damage to the state-owned brick building.

Under a plea deal, Balmer was sentenced to 25 to 50 years in prison. Shapiro and members of his family had to be awakened and evacuated, but no one was injured. The multiple arson and endangerment charges reflected the number of people in the residence at the time, including the governor’s family, guests and state troopers.

The fire was set hours after they celebrated the Jewish holiday of Passover with a Seder in the residence. Prosecutors played video clips that showed Molotov cocktails being thrown and a figure inside and outside the residence. Judge Deborah Curcillo called the video 'horrific' and 'very frightening.' Balmer told police he planned to beat Shapiro with a small sledgehammer if he had encountered him after breaking into the building, according to court documents. Balmer turned himself in the next afternoon to face charges of attempted homicide, terrorism, aggravated arson and aggravated assault.

Police say Balmer broke in through the southern wing of the residence, damaging a room often used to entertain crowds and display art. Investigators recovered two broken glass beer bottles containing gasoline. The fire charred walls, tables, buffet serving dishes, plates and a piano, with damage to window panes and brick around doors and windows.

Balmer’s actions have raised questions about his motivation, especially given the attack's timing during the Passover holiday, but he later stated that the governor's religion was not a factor in his actions. Balmer's mother mentioned attempts to get him help for mental health issues before the incident. Following his plea, Balmer has been sentenced and will face lengthy prison time.