The Australian Government has overturned its decision to deny Novak Djokovic entry due to his vaccination status.
Judge Anthony Kelly ordered that the tennis star be released from detention after his hearing, and instructed the government to pay his costs, BBC News reports.
The 34-year-old world number one was unexpectedly denied entry to Australia when he arrived in Melbourne last week, with his sights set on defending his title at the Australian Open.
He was then taken to a notorious immigration detention hotel, where he remained until his hearing on Monday.
Although Judge Kelly has ruled in his favor, Immigration Minister Alex Hawke could still cancel the Serbian star's visa on new grounds.
The trial - which began on Monday morning - saw the government acknowledge that the tennis pro was not given sufficient time to respond to his visa's cancellation. Djokovic's lawyers argued that when he entered the country he believed to have been granted an exemption from the rule that travelers must be fully vaccinated against Covid-19.

Though he has not spoken publically about his vaccination status, the 20-time Grand Slam champion Djokovic confirmed he is not vaccinated to border officials and is known to have sought a medical exemption.
His lawyer told the court that said exemption has been granted by two separate medical boards after the player provided adequate proof of recent coronavirus infection.
"He had done absolutely everything. He had engaged with everything that was required of him by Tennis Australia," they said.
Judge Kelly agreed with this statement, asking: "What more could this man have done?"
Djokovic's lawyers went on to argue that the star's treatment by border officials was "manifestly unjust".
He was initially given until 8:30AM local time to get in touch with his team and make comments about the visa cancellation. However, Border Officials pressured him to respond, making a final call shortly after 7:40AM.
Judge Kelly said the star should have had more time, adding: "We all play by the same rules. Stated in other terms: those rules were not observed."
Immigration Minister Alex Hawke may still revoke Djokovic's visa, using his personal powers of cancellation.
If he doesn't the pro will go on to compete in the Australian Open, which starts on January 17. If he wins, he will become the most successful men's player in history.