Unvaccinated tennis star Novak Djokovic won the right to take his fight against deportation from Australia to a Federal Court on Saturday after the government cancelled his visa for the second time over COVID-19 entry regulations.
The government undertook not to deport him until the case was over, although the world's number one player was nevertheless ordered to return to pre-deportation detention at 8 am local time (2.30am IST).
His legal team submitted their appeal late at night - less than three hours after Immigration Minister Alex Hawke used discretionary powers to revoke the visa - in the hope that he can still begin the defence of his Australian Open title on Monday.
They said they would argue that Djokovic's deportation could be just as much of a threat to public health, by fanning anti-vaccine sentiment, as letting him stay and exempting him from Australia's requirement that all visitors must be vaccinated.
While Prime Minister Scott Morrison's government has won support at home for its tough stance on border security during the pandemic, it has not escaped criticism for the seemingly inconsistent handling of Djokovic's visa application.
The 34-year-old Serbian, bidding for a record 21st Grand Slam title, had been told on arrival on January 5 that the medical exemption that enabled him to travel was invalid.
He spent several days in immigration detention, in a hotel also used for asylum-seekers, before that decision was revoked on procedural grounds.
Hawke said on Friday that he had now exercised his prerogative to cancel the visa "on health and good order grounds, on the basis that it was in the public interest to do so".
He said he had considered information from Djokovic and the authorities, and that the government was "firmly committed to protecting Australia's borders, particularly in relation to the COVID-19 pandemic".
Judge Anthony Kelly, who revoked the first cancellation, said the government had agreed not to deport Djokovic before the case concluded, and that the player could leave detention to meet his lawyers and attend hearings.
Although Djokovic has publicly opposed compulsory vaccination, he has not campaigned against vaccination in general.
The controversy has nonetheless intensified a global debate over the rights of the unvaccinated, and become a tricky political issue for Morrison as he prepares for an election due by May.
"Australians have made many sacrifices during this pandemic, and they rightly expect the result of those sacrifices to be protected," Morrison said in a statement.
"This is what the minister is doing in taking this action today. Our strong border protection policies have kept Australians safe."
Australia has endured some of the world's longest lockdowns, and has seen a runaway Omicron outbreak bring nearly a million cases in the last two weeks.
More than 90% of Australian adults are vaccinated, and an online poll by the News Corp media group found that 83% favoured deportation for Djokovic.
His cause was not helped by an incorrect entry declaration, where a box was ticked stating he had not travelled abroad in the two weeks before leaving for Australia. In fact, he had travelled between Spain and Serbia.
Djokovic blamed the error on his agent and acknowledged he also should not have done an interview and photoshoot for a French newspaper on December 18 while infected with COVID-19.
The player has, however, been hailed as a hero by anti-vaccination campaigners, and last September more than 200 people were arrested during sometimes violent protests in Melbourne against a lockdown imposed to contain the spread of COVID-19.
Djokovic's legal team said the government was arguing that letting him stay in Australia would incite others to refuse vaccination.
One of his lawyers told the court that this was "patently irrational" because Hawke was ignoring the effect that forcibly removing "this high profile, legally compliant, negligible risk, medical contradicted player" might have on anti-vax sentiment and on public order.
Djokovic had looked relaxed as he practised serves and returns with his entourage on an empty court at Melbourne Park on Friday, occasionally resting to wipe sweat from his face.
He was included in the draw as top seed and due to face fellow Serb Miomir Kecmanovic on Monday.
Greek world number four Stefanos Tsitsipas, speaking before Hawke's decision, said Djokovic was "playing by his own rules" and making vaccinated players "look like fools".
In Belgrade, some already appeared resigned to Djokovic missing the tournament.
"He is a role model to all of us, but rules must clearly be set," Milan Majstorovic told Reuters TV. "I am unsure how big the involvement of the politics is in that."
Another passer-by, Ana Bojic, said: "He can either vaccinate to remain world number one - or he can be stubborn and end his career."