Three men, who were inspired by the Islamic State group, were given lengthy sentences Friday for plotting a Christmas 2016 attack in Australia’s second largest city, a published report said.

The men, Ahmed Mohamed, Abdullah Chaarani and Hamza Abbas, were preparing a mass attack involving explosives and knives at Federation Square, a popular downtown restaurant and entertainment precinct in Melbourne, The Associated Press reported.

FLORIDA MAN ACCUSED OF TRYING TO RECRUIT ISIS TO BOMB DEANS FROM MIAMI-AREA COLLEGES

Justice Christopher Beale, seated at the Supreme Court of Victoria, said Chaarani, 29, and Mohamed, 27, must serve at least 28 years and six months in prison for their parts in the plot.

In this composite image of Hamza Abbas, left, Ahmed Mohamed and Abdullah Chaarani, right, arrive at the Supreme Court of Victoria, in Melbourne, Australia, Friday, Nov. 29, 2019. Mohamed, Chaarani and Abbas were given lengthy prison sentences over preparing a mass attack around Christmas 2016 involving explosives and knives at Federation Square, a popular downtown restaurant and entertainment precinct in Melbourne. (James Ross/AAP Image via AP)

In this composite image of Hamza Abbas, left, Ahmed Mohamed and Abdullah Chaarani, right, arrive at the Supreme Court of Victoria, in Melbourne, Australia, Friday, Nov. 29, 2019. Mohamed, Chaarani and Abbas were given lengthy prison sentences over preparing a mass attack around Christmas 2016 involving explosives and knives at Federation Square, a popular downtown restaurant and entertainment precinct in Melbourne. (James Ross/AAP Image via AP)

Meanwhile, Hamza Abbas, 24, who was involved in the conspiracy for a shorter period, was jailed for 22 years with a non-parole period of 16 years and six months, the AP reported.

“Each of you, to a greater or lesser degree, accessed materials on the internet supportive of Islamic State and violent jihad. Their views became so warped they had come to believe the mass slaughter of innocent civilians would be a glorious act, pleasing to Allah.”

— Justice Christopher Beale, Supreme Court of Victoria


“The stupidity of that belief was only matched by its malevolence,” he added.

CONAN, DOG INJURED IN AL BAGHDADI RAID, HONORED BY PRESIDENT TRUMP AT WHITE HOUSE

Self-confessed ringleader Ibrahim Abbas was sentenced last year to 24 years in prison. He served as a prosecution witness against his brother Hamza Abbas and co-conspirators Mohamed and Chaarani, the AP reported.

Last month, at a plea hearing before Beale, Mohamed and Chaarani claimed they had renounced Islamic State and had worked toward deradicalization since being arrested on Dec. 22, 2016, the report said.

CLICK HERE FOR THE ALL-NEW FOXBUSINESS.COM

At Friday’s sentencing, Beale accepted the three men were on the path to rehabilitation.

This is the second terrorism conviction for Mohamed and Chaarani, who are already serving 22-year prison terms for firebombing a Shiite mosque in Melbourne just weeks before the planned Christmas attack.

The Associated Press contributed to this report.