The man charged in the April arson attack at Pennsylvania Gov. Josh Shapiro’s residence was sentenced Tuesday to decades in prison after pleading guilty to several charges.

Cody A. Balmer, 38, pleaded guilty to attempted murder, aggravated arson, 22 counts of arson, burglary, and other offenses, according to the Dauphin County District Attorney’s Office. Under the plea deal, he was sentenced to 25 to 50 years in state prison, the district attorney’s office said in a statement.

Prosecutors accused Balmer of breaking into the Governor’s Residence in Harrisburg and setting it on fire on April 13, the second day of Passover. Shapiro, who is Jewish, was having a Passover Seder at the home the night before the attack, according to officials.

Security footage released by the District Attorney’s Office appears to show Balmer climbing the property’s fence, approaching the home, and breaking one of its windows with a sledgehammer. Balmer then threw a Molotov cocktail inside, setting the house ablaze, officials said in a news release.

The footage then appears to show Balmer breaking a second window and entering the home. Once inside, Balmer began striking at two doors, including a door that led to where the Governor’s family and guests slept, but did not break through, officials said.

Before fleeing, Balmer deployed a second Molotov cocktail in the dining area, igniting a second fire in the home, the officials said. Prosecutors have previously said that the residence sustained “substantial damage.”

A brick home damaged by fire is seen at night, a firefighter is at the front doors, a charred window with smoke billowing out is seenFirefighters respond to a fire at Pennsylvania Gov. Josh Shapiro’s residence in Harrisburg, Pa., on April 13.Capital City Fire Photos

The Democratic governor, first lady Lori Shapiro, three of their children, fifteen overnight guests — including other members of the Governor’s family — and two Pennsylvania State Police Troopers were all inside the home when the fire erupted in the early hours of the morning, according to the district attorney’s office. All were safely evacuated.

“It’s hard for me to stand before you today and utter the words ‘attempted murder’ when it’s your own life, to know that someone tried to kill me,” Shapiro said at a Tuesday press conference at the Pennsylvania State Capitol Complex, standing beside his wife.

Shapiro said that he has “struggled over the last six months to try and make sense of all of this” and to explain the incident to his children.

“I’ve carried with me this enormous sense of guilt,” he added. “Guilt that doing this job that I love so much has put our children’s lives at risk.”

A lawyer for Balmer did not immediately return a request for comment.

Roughly 12 hours after the April attack, Balmer turned himself in to the Pennsylvania State Police and admitted to “harboring hatred toward Governor Shapiro,” according to authorities.

The probable cause affidavit says that Balmer said he would have beaten the governor with his hammer when asked in the police interview what he’d do had he come face to face with Shapiro.

Balmer suggested he was upset by Gov. Josh Shapiro’s position on the war in Gaza, according to the district attorney’s office. Shapiro sharply condemned the rise of antisemitism in the U.S. following the Oct. 7, 2023, terrorist Hamas attacks, specifically at some pro-Palestinian protests during the two-year war.

Politicians on both sides of the aisle widely condemned the attack, one of several high-profile acts of political violence plaguing the United States in recent years. In June, Minnesota state Rep. Melissa Hortman, her husband, and their dog were fatally shot in their home, in what officials described as “politically motivated” killings.

On Tuesday, Shapiro challenged Americans not to become “numb” to political violence.

“Before this attack, those risks just felt very theoretical to me, something that might happen elsewhere to someone else, but couldn’t happen here,” Shapiro said. “Sadly, this made it all real.”