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 said his client was "gripped" by fears of rendition to the US over the years because of his work with whistle-blowing website Wikileaks.