Julian Assange has been sentenced to 50 weeks in a UK prison - close to the maximum sentence - for skipping bail in 2012 to seek refuge in the Ecuadorian embassy, setting off a seven-year showdown with UK law enforcement and the US that ended with his arrest earlier this month, WSJ reports.

Judge Deborah Taylor said during the sentencing that it would be difficult to find a more serious example of the offense.

Mark Simmons, who represented Assange on Wednesday, said the WikiLeaks founder skipped bail and sought refuge in the embassy because he was afraid of being renditioned to the US from Sweden.

After arriving at the Southwark Crown Court on Wednesday, Assange defiantly raised his fist to rally his supporters. A judge declared during an earlier hearing that Assange's case could warrant the maximum sentence after he was found guilty shortly after his arrest.

On Twitter, Wikileaks blasted the sentence for being "as shocking as it is vindictive" and questioned whether Assange would receive a fair extradition hearing.

Julian Assange's sentence is as shocking as it is vindictive. We have grave concerns as to whether he will receive a fair extradition hearing in the UK. — WikiLeaks (@wikileaks) May 1, 2019

Assange skipped bail in 2012 to avoid being extradited to Sweden over an investigation into allegations of sexual assault.

The Wikileaks founder is facng a separate court hearing on Thursday over a US extradition request. If he is extradited, he could face a maximum of 5.5 years over charges that he conspired to break into a government computer.