WikiLeaks founder Julian Assange was sentenced to 50 weeks in prison on Wednesday for jumping bail in Great Britain in 2012.

Judge Deborah Taylor said Wednesday that Assange merited near the maximum sentence of one year because of the seriousness of his offence.

Taylor rejected his claim for leniency based on the nearly seven years he spent in the Ecuadorian Embassy. She said Assange’s seven years in the embassy had cost British taxpayers £16 million ($21 million US), and he sought asylum as a “deliberate attempt to delay justice.”

The white-haired Assange stood impassively with his hands clasped while the sentence was read at London’s Southwark Crown Court. His supporters in the public gallery chanted “shame on you” at the judge as Assange was led away.

Assange sought asylum in the South American country’s London Embassy in June 2012 to avoid extradition to Sweden, where he was wanted for questioning over rape and sexual assault allegations.

Earlier, Assange apologized unreservedly for skipping bail and holing up in the Ecuadorian Embassy while his lawyers argued that he had jumped bail because he was a “desperate man” fearing extradition to the United States.

In a letter read by attorney Mark Summers, Assange said he found himself “struggling with terrifying circumstances” and did what he thought best.

Assange was arrested April 11 after Ecuador revoked his political asylum, accusing him of everything from meddling in the nation’s foreign affairs to poor hygiene.

He faces a separate court hearing Thursday on a U.S. extradition request. American authorities have charged Assange with conspiring to break into a Pentagon computer system.