A London judge blocked Julian Assange’s extradition to the U.S. on health grounds, a victory for the WikiLeaks founder after close to a decade of imprisonment or self-imposed exile.

Judge Vanessa Baraitser ruled Monday that his extradition to face espionage charges would be oppressive because of the 49-year-old’s mental health, saying he was clearly “a depressed and sometimes despairing man genuinely fearful about his future.”

Assange could potentially be released from the high-security Belmarsh prison as soon as Wednesday, when his lawyers will return to court to make what they say are the “strongest grounds to granting bail” in light of Monday’s ruling.

Baraitser spent the first part of her ruling dismissing Assange’s arguments that prosecutors faced political pressure to send him to the U.S. and that he couldn’t receive a fair trial there. She said, however, that Assange would face “conditions of significant isolation” in U.S. prison. She cited Jeffrey Epstein’s 2019 death as an example of when preventative measures weren’t able to protect inmates from suicide.

“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,” Baraitser said.

The ruling is “going to be difficult to appeal because it’s a factual decision on his mental health,” said Ben Keith, an extradition lawyer in London who doesn’t represent anyone in the case.

Lawyers for the U.S. immediately said they would appeal the decision, a process which could take years.

American prosecutors will likely “do their utmost” to offer assurances to the court that Assange would be given specialist care, said Daniel Sternberg, an extradition lawyer.

“If the U.S. is determined to pursue him, they will throw everything at it to try to deal with the judge’s concerns,” said Sternberg, who isn’t involved in the case. “It’s very far from the end.”

Assange wore a dark navy suit and tie in the court, with a dark grey mask covering his mouth but not his nose. Throughout the judge’s hour-long ruling, his hands were clasped on his left knee.

The decision will be a surprise to the Australian’s supporters, who have openly been pinning their hopes on a pardon from U.S. President Donald Trump. Assange’s fiancée, Stella Moris, has spent the last few months making direct pleas for clemency to Trump via Twitter and appearances on Fox News.

Assange initially sought refuge in the Ecuadorian embassy in 2012 rather than face questioning in a Swedish sexual assault case, which was later dropped. Last year, when he was expelled from the embassy, he faced American charges related to WikiLeaks disclosures.

Assange is accused of working with U.S. Army intelligence analyst Chelsea Manning to get classified documents from databases containing about 90,000 Afghanistan war-related activity reports, 400,000 Iraq war-related reports and 250,000 State Department cables.