Novak Djokovic is a step closer to defending his Australian Open crown and shooting for a record 21st grand slam singles title after winning his case against deportation.
The world No.1 will be freed from immigration after Federal Court Judge Anthony Kelly said he would order on Monday afternoon that the decision to cancel his visa should be quashed and Djokovic be paid costs.
"The decision to proceed with the interview and cancel that visa ... was unreasonable," Judge Kelly ordered after an agreement was reached by Djokovic's legal team and lawyers for Home Affairs Minister Karen Andrews.
He said Djokovic must be released within 30 minutes of the order being made.
But there could yet be another twist in the case that has captured global attention.
Christopher Tran, representing the government, said Immigration Minister Alex Hawke would now consider whether to exercise a personal power of cancellation over Djokovic's visa.
Judge Kelly said he would have been "something approaching incandescent" had he heard about that after the hearing.
Foreshadowing further potential legal action if that occurs, the judge said the stakes were higher now.
He said it was unlikely any other judge could get up to speed with the case and he would need to know as soon as possible if there was going to be another proceeding on short notice.
He also pointed out that Djokovic's personal and professional reputation and economic interests may be directly affected.
"If this man is to be summarily removed upon the personal exercise of cancellation power, he cannot return to this country for three years," he said.
"I expect to be fully informed in advance if I am required to continue to be available for any further proceeding that is to be sought, because on a view, the stakes have now risen rather than receded."
Djokovic arrived in Australia late on Wednesday after declaring he had a medical reason not to get vaccinated against COVID-19.
But he was taken to immigration detention after having his visa cancelled early on Thursday morning.
Djokovic's legal team successfully challenged that decision in a hearing plagued by technical issues, with live streams collapsing under the pressure of tens of thousands of people trying to watch.
Monday's outcome will come as huge relief for Djokovic's legions of fans, including his family in Belgrade who have been staging daily rallies in the Serbian capital since their son's ordeal began.
The saga has divided the tennis world and had left Djokovic's quest for an unprecedented 21st men's major this month at Melbourne Park in turmoil.
Andy Murray declared the whole episode "really bad" for tennis.
Murray, who has lost four Open finals to Djokovic, was left quite dismayed by the events of the past five days.
"I think everyone is shocked by it to be honest," the former world No.1 told reporters.
"It's really not good for tennis at all, and I don't think it's good for anyone involved. I think it's really bad.
"Some stuff has come out that really doesn't look good, either. I want to hear all the facts first before giving all of my thoughts on it."
Murray's thoughts had been echoed by other tennis stars including Australia's most high-profile men's player Nick Kyrgios, who said: "I'm feeling for him now. Like it's not really humane, is it, what's going on?"
Australian Associated Press