https://www.bbc.co.uk/news/uk-48118908
Wikileaks co-founder Julian Assange has been sentenced to 50 weeks in jail for breaching his bail conditions.
The 47-year-old was found guilty of breaching the Bail Act last month after his arrest at the Ecuadorian Embassy.
He took refuge in the London embassy in 2012 to avoid extradition to Sweden over sexual assault allegations, which he has denied.
In a letter read to the court, Assange said he had found himself "struggling with difficult circumstances".
He apologised to those who "consider I've disrespected them", a packed Southwark Crown Court heard.
"I did what I thought at the time was the best or perhaps the only thing that I could have done," he said.
In mitigation, Mark Summers QC had said his client was "gripped" by fears of rendition to the US over the years because of his work with whistle-blowing website Wikileaks.
"As threats rained down on him from America, they overshadowed everything," he said.
"By hiding in the embassy you deliberately put yourself out of reach, while remaining in the UK," she said.
She said this had "undoubtedly" affected the progress of the Swedish proceedings.
His continued residence at the embassy and bringing him to justice had cost taxpayers £16m, she added.
"Whilst you may have had fears as to what may happen to you, nonetheless you had a choice, and the course of action you chose was to commit this offence," she concluded.
As Assange was taken down to the cells, he raised a fist in defiance to his supporters in the public gallery behind him.
They raised their fists in solidarity and directed shouts of "shame on you" towards the court.
Assange's letter of apology in full
I apologise unreservedly to those who consider that I have disrespected them by the way I have pursued my case.
This is not what I wanted or intended.
I found myself struggling with terrifying circumstances for which neither I nor those from whom I sought advice could work out any remedy.
I did what I thought at the time was the best and perhaps the only thing that could be done - which I hoped might lead to a legal resolution being reached between Ecuador and Sweden that would protect me from the worst of my fears.
I regret the course that this took; the difficulties were instead compounded and impacted upon very many others.
Whilst the difficulties I now face may have become even greater, nevertheless it is right for me to say this now.
Assange now faces US federal conspiracy charges related to one of the largest leaks of government secrets.
The UK will decide whether to extradite Assange to the US in response to allegations that he conspired with former US intelligence analyst Chelsea Manning to download classified databases.
He faces up to five years in a US prison if convicted.
Wikileaks has published thousands of classified documents covering everything from the film industry to national security and war.
He will die within a week of prison