WikiLeaks founder Julian Assange has been jailed for 50 weeks for breaching his bail after going into hiding in the Ecuadorian embassy in London while he was wanted over allegations of sexual offences.
The Australian 47-year-old spent nearly seven years living in the embassy, where he sought political asylum, until last month when he was dramatically dragged out by police.
In a letter read to court, Assange said he apologises and "regrets the course" he took to pursue his case.
He said: "I apologise unreservedly to those who consider that I have disrespected them by the way I pursued my case."
Assange continued: "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."
He entered the embassy on June 19, 2012 while under intense scrutiny over leaks of hundreds of thousands of classified US diplomatic cables on his whistleblowing website.
Assange, claiming he was the subject of an American "witch hunt", said he was at risk of being further taken to the US if he was sent to the Scandinavian nation.
On Thursday, he will face a hearing about his potential extradition to the US over the allegation he conspired with intelligence analyst Chelsea Manning to infiltrate Pentagon computers.
Prosecutors in Sweden are also mulling whether to reopen the sexual assault case against Assange, which was dropped in May 2017. Assange denies the allegations.
WikiLeaks have spoken out over Assange's sentencing saying it's "as shocking as it is vindictive".
The company also compared his jail sentence to that of Jack Shepherd, the speedboat killer, who was jailed for an additional six months for skipping bail while awaiting sentencing for the manslaughter of Charlotte Brown.
On Wednesday, the streets leading up to the Southwark court were lined with barriers, with security anticipating groups of demonstrators.
As Assange was taken down to the cells after being jailed for breach of bail offences, he 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.