A British judge has refused a request by the US to extradite WikiLeaks founder Julian Assange to face espionage charges over the site’s publication of classified American military documents a decade ago. The US Justice Department said it will appeal the decision, while Mexican President Andres Manuel Lopez Obrador pledged to offer him asylum. District Judge Vanessa Baraitser gave her ruling at London’s Central Criminal Court on Monday, following a three-week extradition hearing last year, on the grounds it will be detrimental to his mental health. Despite finding Assange's conduct constituted a criminal act, she ruled he was at risk of committing suicide in the US and would use his "intellect" to circumvent anti-suicide prevention measures. "For these reasons, extradition would be oppressive by reason of his mental health and I order his discharge," she said. US prosecutors have indicted Assange on 17 espionage charges and one charge of computer misuse. The charges carry a maximum sentence of 175 years in prison. They have told the court they will be lodging an appeal, which has to be done within 14 days of the hearing, and have asked the court to remand him into custody. The judge has now ordered a hearing on Wednesday to hear a bail application for him. Assange, who sat in the dock at the court for the ruling, wiped his brow as the decision was announced. His partner Stella Moris wept. Lawyers for the 49-year-old Australian had argued that he was acting as a journalist and was entitled to First Amendment protections of freedom of speech for publishing leaked documents that exposed US military wrongdoing in Iraq and Afghanistan. They had accused the US of an “extraordinary, unprecedented and politicised” prosecution that sought to “criminalise obtaining and publishing information relating to national security" and claimed he would not receive a fair trial. But in her verdict, the judge rejected these allegations. She said Assange's conduct went "outside of any role of an investigative journalist" and said there was "insufficient evidence" the US prosecution was the result of pressure from the Trump administration. However, she upheld the defence's argument that extradition would threaten his human rights. His legal team had argued that he risks “a grossly disproportionate sentence” and detention in “draconian and inhumane conditions” that would exacerbate his severe depression and other mental health problems. The judge agreed that his precarious mental health would likely deteriorate further under the conditions of “near total isolation” he would face in US prison. She said Assange was “a depressed and sometimes despairing man” who had the “intellect and determination” to circumvent any suicide prevention measures taken by American prison authorities. “I accept that oppression as a bar to extradition requires a high threshold ... However, I am satisfied that, in these harsh conditions, Mr. Assange’s mental health would deteriorate causing him to commit suicide with the single minded determination of his autism spectrum disorder," the judge said in her ruling. Assange's American lawyer, Barry Pollack, said the legal team was “enormously gratified by the UK court’s decision denying extradition.” “The effort by the United States to prosecute Julian Assange and seek his extradition was ill-advised from the start,” he said. “We hope that after consideration of the UK court’s ruling, the United States will decide not to pursue the case further.” The US Justice Department has said it is "disappointed". "While we are extremely disappointed in the court's ultimate decision, we are gratified that the United States prevailed on every point of law raised," the department said. The judge’s decision is a major moment in Assange’s decade-long legal limbo in Britain – but not the final chapter. The US prosecutors have already stated they intend to appeal to the UK's High Court in London. Assange's partner, Ms<a href="https://www.thenationalnews.com/world/europe/julian-assange-s-partner-extradition-disastrous-for-the-uk-1.1139880"> Moris, who had two sons with him while he lived in the embassy, has appealed to President Donald Trump</a> to pardon him. Later on Monday, Mexico's Mr Obrador backed calls for him to be pardoned. "I’m in favour that Assange is pardoned, furthermore, I will ask the foreign minister to initiate proper procedures to ask the United Kingdom’s government about the possibility that he is set free, and that Mexico offers to provide political asylum," he said. Fugitive US whistleblower Edward Snowden, who is also wanted by the US on espionage charges, welcomed the news and said he hoped it would mark "the end" of attempts to see Assange face spy charges. "Let this be the end of it,” he said. Assange’s legal troubles began in 2010, when he was arrested in London at the request of Sweden, who wanted to question him about allegations of rape and sexual assault made by two women. In 2012, to avoid being sent to Sweden, Assange sought refuge inside the Ecuadorian Embassy, where he was beyond the reach of the UK and Swedish authorities. The relationship between Assange and his hosts eventually soured, and he was evicted from the embassy in April 2019. British police immediately arrested him for jumping bail in 2012. Sweden dropped the sex crimes investigations in November 2019 because too much time had elapsed, but Assange remains in London’s high-security Belmarsh Prison.