HACKENSACK, N.J. — Two men convicted of terrorizing Jewish communities in New Jersey, including firebombing two synagogues and throwing a Molotov cocktail into a rabbi’s home, were sentenced Friday to 35 years in prison.

Anthony Graziano and Aakash Dalal were sentenced in court in Bergen County after they were convicted last year of terrorism charges.

Besides the firebombings, prosecutors say the men also spray painted anti-Semitic graffiti at two other synagogues.

“They were partners in hate. Partners in intimidation and ultimately in crime,” assistant prosecutor Brian Sinclair said.

They faced up to life in prison in the case that was the first to employ a state anti-terrorism statute that requires at least 30 years in prison.

Their attack included the fire in the bedroom of a rabbi’s home in Rutherford. The rabbi, his wife, five children and his parents were sleeping at the time.

“The way I chose to express myself with violence was wrong,” Graziano said at the sentencing hearing while apologizing. “The hatred I had for the Jewish faith was unacceptable. I hope the Jewish community can find peace after tragedy.”

His mother apologized to the Jewish community and said he was “brain-washed and taught to hate” by Dalal.

Dalal did not speak at Friday’s sentencing.

Prosecutors also said that Dalal pushed Graziano along during the hate spree.

“I don’t trust you until you kill a Jew,” Dalal wrote to Graziano in one chat message, prosecutors said.

Attorneys for the men argued for the minimum sentence, pointing out that they were only 19 years old when the attacks happened.

“He’s not a young man who is bitter,” said Graziano’s attorney, Ian Silvera. “He recognizes that he made a huge mistake in his life … to kill anyone was never his intention.”

Dalal’s attorney said that the 30-year prison sentence mandated by the law was excessive for someone who committed a crime at 19.