Tennis star Novak Djokovic was granted a vaccine exemption to enter Australia and play in the Australian Open after recovering from COVID-19, his lawyers share in new court documents filed on Saturday.

Djokovic wasn’t allowed in the country when he landed in Melbourne this week, and now he waits in an immigration detention center for a Monday court case, with his visa status being challenged ahead of the matches. 

“Mr Djokovic had received, on 30 December 2021, a letter from the Chief Medical Officer of Tennis Australia recording that he had been provided with a ‘Medical exemption from COVID vaccination’ on the grounds that he had recently recovered from COVID,” court documents published by Australia’s Federal Circuit read, per CNN. 

After testing positive on Dec. 16, the world’s No. 1 tennis star applied for a medical exemption so he could compete, and was allowed to do so “on the grounds’ that he had beat COVID, per his lawyers. But Australian Border Force say Djokovic “failed to provide appropriate evidence” to enter the country because he is reportedly not vaccinated and Australia doesn’t count previous infection as a valid reason to enter. 

His visa was then cancelled on Jan. 6 as a result of the Migration Act, meaning he appeared to have posed “a risk to the health, safety or good order of the Australian community.” In the recently revealed documents, his lawyers claim he was granted a temporary visa by Tennis Australia and ask he be moved to “a more suitable place of detention” to prepare for the matches. 

“We’ve managed to make sure gluten-free food is delivered to him, as well as exercising tools, a laptop and a SIM card so that he is able to be in contact with his family,” Serbian Prime Minister Ana Brnabic said, adding that he’ll stay at the Park Hotel until there’s a decision.

While the Australian Technical Advisory Group on Immunisation’s Expanded Guidance on temporary COVID vaccination exemption shares that “PCR-confirmed SARS-CoV-2 infection” could exempt visa holders in some cases, Australian Prime Minister Scott Morrison says he told Tennis Australia back in November that unvaccinated players with recent COVID infections would not be allowed into the country to play, per CNN. 

The Australian Open kicks off on Jan. 17 in Melbourne.