A US judge has sentenced two British nationals to far shorter prison sentences than prosecutors were seeking after the men pleaded guilty in December to supporting armed groups through print and online publications.

Babar Ahmad was sentenced on Wednesday to 12 and a half years of a maximum 25 years for the crime, which prosecutors said included helping raise money and recruit fighters for the Taliban before, and after, the September 11, 2001 attacks on the US.

"It is my conclusion that the defendant does not present a risk of becoming involved in future crimes, and was never involved directly with al-Qaeda," Judge Janet Hall said, explaining the lighter sentence, the Reuters news agency reported.

"While these are serious crimes that raised funds for the Taliban and helped its ability to protect Osama Bin Laden and to carry out his September 11 attacks, there must be a distinction made between providing material support and actually taking part in terrorism," Hall said.

The sentence will include the 10 years Ahmad already has served, she said.

A second man, Syed Talha Ahsan, who also pleaded guilty alongside Ahmad to supporting the Taliban through the publications was sentenced to time already served in Britain and the US, which amounted to more than eight years.

He was facing a maximum sentence of 15 years.

The pair, extradited from Britain in 2012, were charged in Connecticut as authorities argued they used an internet service provider in the state to run at least one of their websites.

'Dumb and stupid'

Ahmad's lawyers had argued ahead of sentencing that while he tried to help Muslims under attack in Bosnia and Chechnya through his publications in the 1990s, he regretted supporting the Taliban and condemned the September 11 attacks.

Ahmad told the court before his sentencing that he had acted in a "dumb and stupid" manner.

"The world changed on 9/11," he told the judge, as family members stood behind him. "I was dumb and stupid in my denial of what al-Qaeda had done. I admit to my crimes and have learned from them."

The Taliban is listed by the US as a terrorist organisation with links to al-Qaeda.

Ahsan's younger brother criticised federal prosecutors outside the courtroom for pursuing the case so aggressively.

"The US government must account for targeting my brother and Ahmad as dangerous terrorists, when in fact, they never harmed anyone," Hanja Ahsan said. "We are thankful the judge saw through this reckless persecution."

Lawyer Deirdre Daly said the case "sends a strong message that terrorism in any form will not be tolerated by the United States".