An aspiring New Jersey musician’s twisted desire to join ISIS cost him his freedom this week.

Samuel Topaz — raised in middle-class Fort Lee by a Catholic mother and Orthodox Jewish father — was sentenced Tuesday to eight years in federal prison for plotting with four friends to travel to Syria and join the terror group, according to

The 24-year-old was convinced into converting to Islam by Nader Saadeh, his classmate at Fort Lee High School and a co-defendant.

A talented singer, Topaz went from posting videos of himself on YouTube covering John Legend’s “Ordinary People” and playing varsity football in high school to fasting and praying “day and night,” according to the criminal complaint.

He distanced himself from old friends and refused to go to college because “he does not see a future for himself in the United States,” the complaint said.

Concerned he might go overseas and “do something stupid,” his mother took away her son’s passport and alerted authorities.

Topaz was arrested in 2015. He never made it out of the country.

In an interview with federal agents in July of that year, he admitted his plans to travel abroad to join ISIS and said he watched videos of beheadings.

Topaz was originally facing up to 20 years behind bars — but copped a plea deal with prosecutors in exchange for pleading guilty to conspiring with others to provide material support to ISIS and cooperating against his co-defendants.

“As a believer in God, I’ve shamed myself,” Topaz told New Jersey federal Judge Susan Wigenton on Tuesday. “I’ve not only hurt myself, but I’ve also hurt my family, my friends and my country. For that I truly apologize.”

His mother, Ruth Topaz, was also in court and told the judge she only tried to help her son by ratting him out.

“When I see all the things that was happening, I see him dead,” she said. “I don’t want to expose my children to anything.”

Also arrested were Saadeh’s brother Alaa, Queens resident Munther Omar Saleh, who plotted attacks in New York, and Staten Island resident Fareed Mumuni.

Saleh was sentenced to 18 years. Mumuni was sentenced last week to 17.

Saadeh is serving a 10-year term after cooperating with authorities, and his brother Alaa got 15 years in 2016.