Five men convicted of a terrorist conspiracy were today given sentences between 23 and 28 years after the longest trial in Australian history.

The men were found guilty in October on a range of charges including possessing bomb-making instructions and explosive chemicals.

Prosecutors said the men had stockpiled chemicals and detailed instructions for making bombs capable of causing large-scale death and destruction, but the details of the plot and its intended target were never specified. All five men had pleaded not guilty.

Justice Anthony Whealy said the men had been inspired by "intolerant, inflexible religious conviction" and remained unrepentant.

"These men will face many years in jail ...but they appear to wear their imprisonment like some badge of honour," he told the court in Sydney.

The five, who cannot be named for legal reasons, were driven by a belief that Islam was under attack throughout the world by the US and its allies, including Australia, he said.

"Each man's conviction was that the plight of Muslims in other lands demanded violent action in this country to redress those wrongs and, through fear and panic in the community, to change the government's policies," he said.

The men were among nine people arrested during a series of raids in 2005 and 2006 by the police and the Australian Security Intelligence Organisation (ASIO), the domestic security service. The remaining four pleaded guilty to lesser offences.

The jury heard from 300 witnesses, and was shown 3,000 pieces of evidence, 30 days of surveillance tapes and 18 hours of phone intercepts.

Justice Whealy said that although the intention to kill could not be proved, the large stockpile of dangerous materials which the suspects had accumulated - including chemicals for bomb making and ammunition - showed they intended to cause such extensive property damage that it would have posed a serious risk to human life.

He also noted that there was "a wide range" of this material that had never been recovered and might be available to terrorists in future conspiracies.

What was particularly appalling was the voluminous collection of extremist Islamic propaganda which each had acquired as it glorified Osama bin Laden and contained graphic images of violence involving hostages, the judge said.

Some of the videos involving executions were so horrific that they were not shown to the jury, which instead viewed only a written summary of the material, he said.

The jury was apparently convinced that each man had intended to detonate explosives for the purpose of carrying out violent jihad to coerce the Australian government into changing its support of the invasion of Muslim countries, he said.

During the summing up the men, who wore traditional Islamic dress, smiled and even exchanged pleasantries with each other. They smiled again after their sentences were pronounced.

The group's ringleader, aged 44, was sentenced to a maximum term of 28 years in prison while his deputy, aged 36, was sentenced to 27 years. The third man, 40, was sentenced to 20 years, the fourth man, 34, was sentenced to 26 years and the fifth, aged 25, was sentenced to 23 years in prison.

They had faced a maximum penalty of life in prison. The judge allowed for parole after the men serve 17 to 21 years in prison.

Two men shouted from the back of the court in Arabic: "Be patient. Allah is with you."