MELBOURNE (Reuters) -- Tennis superstar Novak Djokovic flew out of Australia on Sunday after a court upheld the government's decision to cancel his visa, capping days of drama over the country's COVID-19 entry rules and his unvaccinated status.
The unanimous ruling by a three-judge Federal Court bench dealt a final blow to Djokovic's hopes of chasing a record 21st Grand Slam win at the Australian Open that starts on Monday.
The Serbian player went to the airport in Melbourne just hours later. Federal agents escorted him and his team from the business lounge to the gate, where he boarded an Emirates flight bound for Dubai. The flight took off shortly before 11 p.m. (1200 GMT).
In a rollercoaster ride, the world's top men's player was first detained by immigration authorities on Jan. 6, ordered released by a court on Jan. 10 and then detained on Saturday again pending Sunday's court hearing.
Djokovic said after the ruling he was extremely disappointed as it meant he could not take part in the tournament.
"I respect the Court’s ruling and I will cooperate with the relevant authorities in relation to my departure from the country," he said in a statement, and wished the tournament well.
Djokovic, 34, had appealed against Immigration Minister Alex Hawke's use of discretionary powers to cancel his visa. The minister had said Djokovic could be a threat to public order because his presence would encourage anti-vaccination sentiment amidst Australia's worst coronavirus outbreak.
Chief Justice James Allsop said the court ruling was based on the lawfulness and legality of the minister's decision in the context of the three grounds of appeal Djokovic's legal team lodged.
"It is no part of the function of the court to decide upon the merits or wisdom of the decision," Allsop said, adding that the three judges were unanimous in their ruling. Full reasoning behind the ruling would be released in coming days, he said.
The player's visa saga has dominated headlines around the world and fuelled a debate over the rights of people who opt to remain unvaccinated as governments take measures to protect their people from the two-year coronavirus pandemic.
The controversy became a political touchstone for Prime Minister Scott Morrison as he prepares for an election due by May. His government has faced criticism for its handling of Djokovic's visa application.
Morrison welcomed the court's ruling, saying the decision will help "keep our borders strong and keep Australians safe."
"It's now time to get on with the Australian Open and get back to enjoying tennis over the summer," he said in a statement.
Djokovic had been granted a visa to enter Australia, with a COVID-19 infection on Dec. 16 providing the basis for a medical exemption from Australia's requirements that all visitors be vaccinated. The exemption was organised through Tennis Australia.
That exemption prompted widespread anger in Australia, which has undergone some the world's toughest COVID-19 lockdowns and where more than 90% of adults are vaccinated. The government said recent infection alone did not meet its standards for an exemption.
But the player also had some support, especially in his native Serbia and from Serbians living in Australia.
Serbian prime Minister Ana Brnabic said Sunday, "I think that the court decision is scandalous, I am disappointed, I think it demonstrated how the rule of law is functioning or better to say not functioning in some other countries."
In the Serbian capital Belgrade, Djokovic's hometown, many support him though some felt he should have been vaccinated.
"I think Australia should be ashamed of itself and that the decision was not a just one. I am sorry for Novak as a tennis player and as a person," said Danilo Mircic, a student.
"If I were him, I would get vaccinated and avoid problems in the future," said Aleksandar Janjic, a middle-aged computer programmer.
In Melbourne, around 70 Djokovic fans, including young children, sang folk songs and chanted in the Federal Court plaza while they waited for the court’s ruling.
They gathered around a loudspeaker to hear the judge reading out the decision, but it took several minutes after the court adjourned before they worked out that Djokovic had lost. Two women were weeping, while others started up chants for a short while before the crowd dispersed.
"What they did today is everything except justice,” said Natasha Marjnovic, 44, a Djokovic supporter who was wiping away tears. "They killed a beautiful sportsman and his career and for all of us who love tennis."
The men's tennis governing body ATP said "today's decision to uphold Novak Djokovic's Australian visa cancellation marks the end of a deeply regrettable series of events".
It added in a statement that decisions of legal authorities regarding public health must be respected.
Tennis Australia said it respected the decision.
On the tennis circuit, fellow players had become impatient for the media circus around Djokovic to end as it had become an unwelcome distraction, casting uncertainty over the draw for the tournament.
But several voiced sympathy for Djokovic following his legal defeat.
"There was a political agenda at play here with the elections coming up which couldn't be more obvious," Vasek Pospisil, a Canadian tennis player, said on Twitter.
"This is not his fault."