"Novak Djokovic be released from immigration detention, finding the government's decision to revoke the tennis star's visa to enter the country was unreasonable," Judge Anthony Kelly said.
Judge Kelly ordered Djokovic be released within 30 minutes and his passport and other travel documents returned to him, rekindling the world number one's chance to win a record 21st Grand Slam title at the upcoming Australian Open.
However, lawyers for the federal government told the court the country's immigration minister was reserving the right to exercise his personal power to again revoke Djokovic's visa.
With the Australian government facing a humiliating and high profile defeat, lawyer Christopher Tran informed the judge that immigration minister Alex Hawke may step in with executive powers and could still cancel his visa on new grounds.
"I'm instructed (the minister) will consider whether to exercise a personal power of cancellation," he said.
Djokovic, 34, has been held in an immigration detention hotel alongside long-term asylum seeker detainees since Thursday. He was permitted to attend his lawyers' chambers for the virtual hearings but has not been seen in public since he arrived in Australia.
His lawyers argued that a recent Covid-19 infection qualified Djokovic for the medical exemption from a requirement for non-Australian citizens entering the country to be double vaccinated.
The Australian government, however, said non-citizens had no right of guaranteed entry to Australia, questioned his claimed exemption and stressed that even if Djokovic wins the court action, it reserved the right to detain him again and remove him from the country.