0447 GMT January 25, 2022
Judge Anthony Kelly ruled the federal government's decision last week to revoke the tennis star's visa was "unreasonable" and ordered Djokovic be released, Reuters reported.
News of the ruling was greeted with noisy celebrations of drum beating and dancing by a group of around 50 supporters, many draped in the Serbian flag, outside the Melbourne court.
Lawyers for the federal government, however, indicated the fight may not be over, telling the court Immigration Minister Alex Hawke was reserving the right to exercise his personal power to again revoke Djokovic's visa.
After confirming that such a step, if taken, would bar 34-year-old Djokovic from the country for three years, Kelly warned the government lawyers that "the stakes have now risen, rather than receded."
Djokovic's plight has been closely followed around the world, creating diplomatic tensions between Belgrade and Canberra and sparking heated debate over national vaccination rules.
Kelly also ordered the federal government pay legal costs for Djokovic, who spent several days in an immigration detention hotel, noting that his lawyers argued his "personal and professional reputation and his economic interests may be directly affected".
Sleepless night in Belgrade
Djokovic, who was present in his lawyers' chambers for the hearing, did not immediately appear in public or make a statement after the ruling. The Australian Open starts on Jan. 17.
"It was a sleepless night for the family," his brother, Djordje Djokovic, told Belgrade's TV Prva. "Novak showed his perseverance and trust in himself. He showed he's a great man."
However, Djordje Djokovic said the family was concerned at the potential his brother would again be detained and ordered to leave Australia.
Kelly said he had quashed the government decision to block Djokovic's entry to Australia because the player was not given enough time to speak to tennis organisers and lawyers to respond fully after he was notified of the intent to cancel his visa.
Kelly noted that officials at Melbourne's airport made the player switch off his phone from midnight until around 7.42 a.m. local time, when the decision to cancel his visa because of problems with his medical exemption was made.
Officials also reneged on an agreement to give Djokovic until 8.30 a.m. to speak to tournament organiser Tennis Australia and lawyers, the judge said.
Djokovic was instead woken up by officials at around 6.00 a.m. after a brief rest and said he felt pressured to respond. The player, a long-term vocal opponent of mandatory vaccination, told border officials he was unvaccinated and had had COVID-19 twice, according to a transcript of the interview.
Kelly earlier told the court it appeared Djokovic had sought and received the required medical exemption from COVID-19 vaccination on the basis that he had contracted the virus last month. He had presented evidence of this before he travelled to Melbourne and when he landed on Wednesday evening.
"What more could this man have done?" Kelly said.
Kelly's ruling did not directly address the issue of whether the exemption on the grounds of an infection in the past six months was valid, which the government had disputed.
Djokovic's case had caused anger in Australia, where more than 90% of the adult population is double vaccinated and public opinion has been largely against the player.
Emotions run particularly high in Melbourne, which experienced the world's longest cumulative lockdown.
Former Prime Minister Kevin Rudd accused current leader Scott Morrison's centre-right coalition government of bungling the situation.
"Total incompetence! If they seriously didn't want him, why on earth did they give him a visa to fly here?" Rudd said. "This was conceived as one giant distraction strategy when out in the real world people can't get tested."