Novak Djokovic stands with Australian Open tournament director Craig Tiley during the trophy presentation at the Australian Open tennis championships in Melbourne, Australia, last February.

Caption

Novak Djokovic stands with Australian Open tournament director Craig Tiley during the trophy presentation at the Australian Open tennis championships in Melbourne, Australia, last February. / AP

Updated January 10, 2022 at 10:33 AM ET

An Australian judge reinstated Novak Djokovic's visa Monday, moving the tennis star one step closer to playing in the Australian Open later this month. But the immigration minister's office says he could still revoke Djokovic's visa over his vaccination status.

Judge Anthony Kelly agreed that before leaving for the Melbourne tournament, Djokovic had done what was asked of him by documenting his request for an exemption. He also said that the Australian Border Force had acted too quickly in ordering the Serbian to leave the country without giving him adequate time to respond.

Shortly after the ruling, Djokovic posted a photo of himself at a tennis court, saying he was "pleased and grateful" for the judge's action. He added that he still intends to play in the Grand Slam tournament.

"Despite all that has happened in the past week, I want to stay and to try to compete at the Australian Open. I remain focused on that. I flew here to play at one of the most important events we have in front of the amazing fans."

In hearing the case, Kelly said he was "agitated" about the tennis star's treatment, asking in court, "What more could this man have done?" according to the Australian Broadcasting Corporation (ABC).

"Djokovic's lawyers really dominated the proceedings in the federal court here in Australia" in making their case against the government, Tom Maddocks of the ABC told NPR's Morning Edition.

As he restored Djokovic's visa, Kelly also said he should be released from hotel quarantine. But Immigration Minister Alex Hawke could still use his discretionary power to oust Djokovic — and if he does so, that order could bar the world's No. 1 tennis player from Australia for three years.

The case has become a sensation in Australia, where protesters and counterprotesters have massed outside the building where Djokovic was cooped up for several days. After the judge's ruling, chaos broke out near the office of Djokovic's lawyer in Melbourne.

"There was a huge mob of Serbian fans waiting outside," Maddocks said. "They mobbed the car, which came out of this building. Police deployed pepper spray. There were some quite ugly scenes, to be honest. We're unsure if Novak Djokovic was inside that car."

Federal officials had been set to deport Djokovic, who arrived in Australia unvaccinated last week. The Serbian said he had been granted a medical exemption, igniting fury in the country where more than 91% of the adult population is fully vaccinated against COVID-19. The case quickly bloomed beyond the realm of local, state and tournament officials, rising to the top of the political chain.

"There should be no special rules for Novak Djokovic at all. None whatsoever," Prime Minister Scott Morrison said just before the tennis player's visa was canceled late last week.

Djokovic has won the past three editions of the Australian Open. The 2022 tournament starts one week from today and runs through Jan. 30.

A version of this story first appeared in the Morning Edition live blog.

Copyright 2022 NPR. To see more, visit https://www.npr.org.