Two men will spend at least the next 28 years in jail and another at least 16 years after conspiring to plot a terrorist attack in Melbourne’s Federation Square.

Ahmed Mohamed, Abdullah Chaarani and Hamza Abbas are three of four men convicted over the plot to behead people and set off bombs on Christmas Day in 2016.

The fourth was Hamza Abbas’ brother Ibrahim Abbas, who is already serving up to 24 years after pleading guilty to the plot last year.

The group had bought machetes, carried out reconnaissance in the Melbourne CBD and built practice bombs while conspiring to develop the potentially deadly plan.

They were arrested and taken into custody three days before Christmas.

At the supreme court of Victoria on Friday, Justice Christopher Beale sentenced Mohamed and Chaarani to 26 years’ jail over the conspiracy.

But 16 years of that sentence will be served cumulatively with a 22-year sentence they are serving for a firebomb attack on a Melbourne mosque in December 2016.

Beale gave them a new non-parole period of 28 years and six months.

Abbas, who was involved in the conspiracy for a shorter time, has been jailed for 22 years, with a non-parole period of 16 years and six months.

Beale said each had ultimately embraced “Islamic State’s hateful ideology” before they began conspiring.

“Each of you to a greater or lesser degree accessed materials on the internet supportive of Islamic State and violent jihad,” he said.

Their views became so warped they had come to believe the mass slaughter of innocent civilians would be a “glorious act, pleasing to Allah”.

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