WikiLeaks founder Julian Assange has been refused bail and will remain in a UK prison despite winning his battle to avoid extradition from Britain to the US. The US authorities had applied to the court to keep Assange behind bars on the grounds he was a flight risk as they wait to appeal against the extradition verdict at London's High Court. Earlier this week Mexico had made an offer of asylum to Assange. Judge Vanessa Baraitser rejected the bail application for Assange at London's Westminster Magistrates Court on Wednesday. The bail ruling followed her decision on Monday to refuse the US's extradition request on the grounds it would 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. Assange, 49, faces 18 criminal charges of breaking espionage law and conspiring to hack government computers. The charges relate to the release by WikiLeaks of hundreds of thousands of confidential US military records and diplomatic cables which US officials say put lives in danger. Although Judge Baraitser accepted the US legal arguments in the case, she said Assange's mental health issues meant he would be at risk of suicide if he were extradited. On Wednesday, the US argued that their attempts to appeal for the extradition would be “frustrated” if he was released as a result of other nations offering him sanctuary and said he was a "flight risk". “This court should be under no illusion of the readiness of other states to offer him help,” prosecutor Clair Dobbin said. “After this court handed down its judgement the President of Mexico offered him asylum. “He has exploited quite ruthlessly those who put their trust in him. Mr Assange regards himself as above the law and no cost is too great to avoid him being sent to the US. "Flight is a far greater impulse or likelihood given all his attempts to avoid extradition in the first place.” An argument that he was at risk of catching Covid-19 because of a prison outbreak was rejected after the court heard only three prisoners presently have Covid-19 and are being kept in a separate area. Assange's legal team said all the people in his neighbouring cells had Covid-19 and that top-security Belmarsh Prison in east London, where he is being held, had a "major outbreak". His barrister Edward Fitzgerald QC had argued Assange's success in the extradition ruling had "massively reduced" the risk he would abscond. "Mr Assange now has every reason to stay in this jurisdiction as he has the protection of the law," Mr Fitzgerald QC said. "His family would anchor him to the community for the first time. He would be safer isolating with his family. The absconsion was eight years ago in totally different circumstances. Now everything has changed. "The Mexican offer was quite clearly to come into effect after the legal proceedings are concluded, not that he would go to the [Mexican] embassy." The US Department of Justice said it would continue to seek his extradition and an appeal has been officially lodged. WikiLeaks published hundreds of thousands of secret US diplomatic cables that laid bare often critical US appraisals of world leaders. Assange made international headlines in early 2010 when WikiLeaks published a classified US military video showing a 2007 attack by Apache helicopters that killed a dozen people in Baghdad. In June 2012, Assange fled to London's Ecuadorean embassy after losing his bid to prevent his extradition to Sweden, where he was wanted for questioning over alleged sex crimes. Assange met his partner and fathered two children while in the Ecuadorian embassy. Mr Fitzgerald QC said Assange's experience in the Ecuadorian embassy was "unpleasant" and he would not "ever be likely" to repeat it by entering another nation's embassy on his release. Assange had remained in the embassy, living in confined conditions, until being dragged out in April 2019. Although the Swedish case against him had been dropped by then, he was jailed for breaching UK bail conditions and his supporters forfeited sureties of £93,500 ($127,076). He has remained behind bars after completing his jail term pending the outcome of the extradition case, which would include any appeal by the US. The judge had previously refused him bail, saying he remained a flight risk. Assange's partner Stella Moris said after the US's extradition request was refused on Monday that they could not celebrate as long as he was still in prison. "We will celebrate the day he comes home," she said.