Blaming his actions on a fit of frustration and anger, a Bucks County man pleaded guilty Tuesday to two counts of harassment and was sentenced to one year of probation for threatening to kill Pennsylvania Gov. Tom Wolf’s family members last year.

Brian Rafferty, 62, repeatedly apologized for making the threats during a phone call to Wolf’s office, and said he never intended to actually harm Wolf or his family.

“I am truly sorry for what I did,” Rafferty told Bucks County Judge Diane Gibbons during a hearing in her Doylestown courtroom. “It will never happen again, cross my heart and I swear.”

Gibbons accepted his apology, noting that Rafferty, of Oakford, had cooperated with investigators from the beginning and didn’t seem to be a threat to the community.

“The nature of the communication demonstrates frustration and anger, and while I would never justify it ... we have an individual who has used threatening language out of that transitionary anger,” Gibbons said.

Rafferty was arrested in April of last year after making the threats during a phone call with a staff member in Wolf’s office.

“I live right down the street from the governor’s daughter and granddaughter and they’re dead, you hear me?” Rafferty said, according to the affidavit of probable cause for his arrest. “They’re dead.”

» READ MORE: His unemployment benefits were delayed by the coronavirus. Then he threatened to kill Gov. Wolf’s family, police say.

Hours later, state police troopers took him into custody. Rafferty admitted to police that he made the threats, the affidavit said. He told the troopers he was “upset due to not receiving his unemployment money and being unable to make contact with anyone in the unemployment office.”

At the time, Rafferty had been temporarily laid off from Classic Transportation, the Bensalem business where he has been employed for nearly 30 years. He has since gone back to work.

Initially, Rafferty was charged with terroristic threats — a more serious charge — and harassment. But prosecutors, led by Deputy District Attorney Monica Furber, agreed to replace the threat charge with another count of harassment.

In making that decision, Furber said her office took into account that Rafferty had never been arrested before, and had not made attempts to contact Wolf or threaten him again. Additionally, she said, lawyers for the governor felt satisfied that Rafferty did not pose an ongoing threat to Wolf.

Rafferty also underwent mental health treatment after his arrest and said Tuesday he was willing to continue that treatment if asked by the court.

Rafferty’s attorney, Louis Busico, said after the hearing that he was pleased with the outcome.

“I’ve said from the beginning that Mr. Rafferty never threatened anyone — he lost his temper during the most difficult time in the history of the Commonwealth of Pennsylvania and said some things he shouldn’t have,” Busico said. “Nevertheless, we’re grateful that Gov. Wolf, as he has demonstrated throughout this pandemic, exercised compassion and forgiveness where Mr. Rafferty was concerned.”