(LONDON) — WikiLeaks founder Julian Assange cannot be extradited to the United States, a judge in the U.K. ruled Monday.

Judge Vanessa Baraitser delivered the judgement at the central criminal court in London. The U.S. has 14 days to appeal the ruling, which has come after weeks of hearings at London’s Old Bailey court and a years-long campaign by Assange’s supporters. The extradition hearing was delayed last year due to the COVID-19 pandemic.

The U.S. Department of Justice said it would appeal the decision and continue to seek Assange’s extradition.

Judge Baraitser rejected Assange’s defense team’s claims that the U.S. case against him was political and that he would not receive a fair trial. She also said his mental health could become worse under prison conditions he would likely face in U.S. jails and ordered that he be discharged from prison.

“I find that the mental condition of Mr. Assange is such that it would be oppressive to extradite him to the United States of America,” she said.

British law states that when a person’s mental or physical condition makes extradition unjust “or oppressive” the judge must order the person’s discharge.

A professor of neuropsychiatry had diagnosed Assange with recurrent depressive disorder, noting that suicidal thoughts by Assange were “highly plausible.” He also said that Assange suffered from PTSD relating to a childhood incident and general anxiety disorder.

The judge also concluded that measures in U.S. jails to thwart suicide were inadequate, given the “single-minded determination of his autism spectrum disorder.”

The U.S. still declared victory on the merits of the case, with a DOJ spokesperson telling ABC News in a statement, “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. In particular, the court rejected all of Mr. Assange’s arguments regarding political motivation, political offense, fair trail, and freedom of speech.”

Assange founded WikiLeaks in 2006. The site publishes secret documents leaked to the site from whistleblowers.

It became notorious after it published massive dumps of diplomatic cables and sensitive, unredacted documents, some relating to the U.S. wars in Iraq and Afghanistan.

Last May, a British court sentenced Assange to 50 weeks in jail for jumping bail in 2012 to avoid extradition to Sweden, where he was wanted on sexual assault allegations which he has denied.

Assange remained in the Ecuadorean embassy in central London for seven years until he was released from the compound last April and transferred to the high security HM Belmarsh prison in London where he was put into isolation.

Hours after his arrest, U.S. prosecutors announced charges against him for allegedly conspiring with former intelligence officer Chelsea Manning to hack government computers.

WikiLeaks has continued to publish controversial material, including stolen documents and emails from the Democratic National Committee, Hillary Clinton’s campaign manager John Podesta and thousands more intelligence documents during the 2016 presidential election.

Copyright © 2021, ABC Audio. All rights reserved.