Wikileaks founder Julian Assange pleaded guilty in a US court in Saipan on Wednesday under a deal that will allow him to leave a free man following a 14-year-old legal battle. Assange entered the formal plea to a single charge in the Northern Marina Islands, an American territory in the Pacific. 


"Guilty to the information," Assange said, according to AFP, and later joking to the judge during the proceedings that whether he is satisfied "depends on the outcome of the hearing".


The 52-year-old was being pursued by US officials over a huge disclosure of secret files in 2010 which they said put lives in danger. Following the hearing he will fly to Australia, reuniting with his family. 


During the hearing on Wednesday morning local time, Assange admitted to a felony charge of conspiracy to obtain and disclose national defence information. 


ALSO READ: US: Brutal DC Heat Melts Former President Abraham Lincoln's Wax Statue


He told the court that he believed he would be protected by the First Amendment of the US Constitution when he published the classified files leaked to him in 2010 when he was working as a journalist, reported BBC.  


The Wikileaks founder was released Monday from a high-security prison in the UK, where he spent the last five years fighting extradition attempts by the US.   


In 2010, Assange faced separate charges of rape and sexual assault in Sweden which he refuted. He spent seven years hiding in the London embassy in Ecuador claiming that the Swedish case would lead him to be sent to the US. 


After the hearing is done, Assange will head to Canberra in Australia, said Wikileaks on social media platform X, adding that the plea bargain "should never have had to happen."


The Australian government said that his case had "dragged on for too long" and there was "nothing to be gained by his continued incarceration".