Wikileaks founder Julian Assange has been sentenced to 50 weeks in jail for violating his bail conditions after seven years holed up inside the Ecuadorian Embassy in London.
The whistleblower sought refuge at the London address in 2012 after he was accused of sexual offences in Sweden.
The 47-year-old was finally arrested last month after years inside the building, and now faces extradition to the US over leaks of classified information.
Announcing the sentence, Judge Deborah Taylor told Assange: “It’s difficult to envisage a more serious example of this offence.”
She added: “By hiding in the embassy you deliberately put yourself out of reach, while remaining in the UK.”
She told Assange that by doing so he had “exploited your privileged position to flout the law”.
As he was taken down to the cells, Assange defiantly raised his fist to the supporters in the public gallery behind him.
They raised their fists back at him in solidarity and shouted “shame on you” towards the court, the Press Association reports.
In a letter read to court, Assange “apologised unreservedly” for “the way I pursued my case”.
He added: “I found myself struggling with difficult circumstances. I did what I thought at the time was the best or perhaps the only thing that I could have done.
“I regret the course that that has taken.”
Those difficulties, the letter continued, were “compounded” and also “impacted upon very many others”.
In mitigation for Assange Mark Summers QC, told the court his client had been “gripped” by fears of rendition to the US over the years because of his work with WikiLeaks.
He said: “As threats rained down on him from America, they overshadowed everything as far as he was concerned.
“They dominated his thoughts. They were not invented by him, they were gripping him throughout.”
The extradition request will be heard by a London court on Thursday.
The US Justice Department said Assange was charged with conspiring with former Army intelligence analyst Chelsea Manning to gain access to a government computer as part of a 2010 leak by WikiLeaks of hundreds of thousands of US military reports about the wars in Afghanistan and Iraq and American diplomatic communications.