Novak Djokovic’s deportation order overturned by court, meaning he will be released by the authorities from detention.

The men’s world number one tennis player will be free to leave the Park Hotel in Carlton – where he's spent the last four nights.

The government has also been ordered to cover all costs related to the appeal.

The Australian government agreed to revoke the decision to cancel Novak Djokovic's visa last week, meaning the visa he came to Australia on stands

He will be released from detention and get his passport and other personal effects back.

The court’s finding, read out in an online hearing, recalled that Djokovic was interviewed overnight at Melbourne airport after his arrival late on Wednesday night.

In the early hours of the next morning, the player was told he had until 8:30 am to reply to the proposed cancellation of his visa. But instead, the border agent cancelled it at 7:42 am.

If Djokovic had been given until 8:30 am as first promised, “he could have consulted others and made submissions to the delegate about why his visa should not be cancelled,” the judge said.

“I’m instructed (the minister) will consider whether to exercise a personal power of cancellation,” lawyer Christopher Tran said.