Following hours of deliberations, technical glitches and arguments from both sides, Justice Anthony Kelly ordered Djokovic to be released from a temporary hotel detention facility and his possessions returned within 30 minutes of the Monday ruling.Justice Kelly also ordered the respondent in the case — the Australian Ministry of Home Affairs — to pay Djokovic’s legal costs. Following the decision, a lawyer for the government said Australia’s Minister for Immigration reserves the right to personally intervene in the case. Christopher Tran, acting for the government, said Minister Alex Hawke retains ministerial power to remove Djokovic from the country, despite the ruling. The ruling, held via video link at the Australian Federal Circuit Court in Melbourne, comes after days of speculation and public anger about whether the tennis star would be able to play in the Australian Open, despite being unvaccinated for Covid-19. The 34-year-old Serb flew to Australia on January 5, only to have his visa canceled after Australian Border Force deemed his medical exemption from requirements that all arrivals be fully vaccinated against Covid-19 was invalid. Faced with deportation and his hopes of winning a record 21st Grand Slam in jeopardy, Djokovic launched a legal challenge.During the hearing, Djokovic’s legal team argued he had obtained the required medical exemption to travel to Australia and bypass vaccination restrictions for Covid-19. That exemption had been granted on the grounds that Djokovic had natural immunity after being infected with Covid-19 in December, his defense argued.Djokovic, who has previously voiced opposition to Covid-19 vaccines and vaccine mandates, was unvaccinated when he arrived in Australia. In his ruling, the judge noted that if Djokovic had been deported, he would have been banned from Australia for three years.The case has attracted worldwide attention and sparked anger from both his supporters and critics, with some saying his case shows celebrities are getting special treatment when it comes to Australia’s tough Covid-19 rules, which have seen families separated for years, and others who believe coronavirus restrictions are encroaching on their civil liberties. Djokovic’s situation has also highlighted the plight of asylum seekers in Australia — with dozens of refugees inside the same hotel as Djokovic who have been locked up for years, and who face indefinite detention under Australia’s tough immigration rules.The arguments The arguments for both the defense and the government essentially centered around guidelines issued from an advisory group for the federal government called the Australian Technical Advisory Group on Immunization (ATAGI). Nick Wood, Senior Counsel representing Djokovic, argued ATAGI advice states that past Covid infection provides at least six months of natural protection — “and therefore may be regarded as a temporary exemption to vaccination.”He said Djokovic understood he’d been given approval to come to Australia by the government, and had made repeated appeals to federal officers in Melbourne that “he had done absolutely everything that he understood was required for him to enter Australia.””Any reasonable person would understand, and he did understand, that he had ticked absolutely every box,” Wood added.Lawyers for Australian Minister for Home Affairs, Karen Andrews, defended the Australian Border Force decision to deport Djokovic, arguing the tennis star did not provide any medical reason why he could not be vaccinated against Covid-19. The government said Djokovic was mistaken to think he was guaranteed entry, and that a previous Covid infection does not equate to a valid medical reason why he could not be vaccinated.They pointed to the same ATAGI guidelines, which say despite acknowledgment of natural protection, past infection “is not a contraindication to vaccination” — meaning it is not a valid reason for somebody not to get the vaccine.The government also argued that while those guidelines suggest people can temporarily put off their vaccination after acute illness, “there was no suggestion Djokovic was seriously ill.””All he has said is that he tested positive for Covid-19. That is not the same,” the government said in its court submission. Tran, the government’s barrister, said authorities have a low bar to canceling visas and that even the possibility of a risk to Australians’ health was reason enough. Justice Anthony Kelly, however, appeared to acknowledge Djokovic’s position, saying he was “agitated” by the burden placed on the tennis star to provide officials with evidence.Djokovic had recorded a Covid-19 infection in December — which two independent panels agreed to be a good enough reason to delay Djokovic’s need to be vaccinated.”What more could this man have done?” Judge Kelly said. What Djokovic is playing for at the Australian OpenThe visa debacle had threatened Djokovic’s chances of winning a record 21st Grand Slam at the Australian Open, which kicks off in Melbourne on January 17. Djokovic currently holds 20 Grand Slam victories, equaling the all-time record with tennis greats Spain’s Rafael Nadal and Switzerland’s Roger Federer. A victory in Melbourne would mean Djokovic breaks the record for the most career grand slams ever held by a man. That is a very real possibility — Djokovic has won the Australian Open nine times before. Federer, 40, is not playing in Melbourne and while Nadal, 35, is set to play, he has been beset with injury. The pair have faced each other 58 times, with Djokovic leading with 30 wins to 28. Nadal, who has won one Australian Open in 2009, is ranked world No. 6. CNN’s Hilary Whiteman, Hannah Ritchie and Angus Watson contributed reporting.