Australia's High Court is set to rule on Wednesday in a test case that will challenge the legality of Australia's offshore detention of refugees.

Should the verdict come down on the side of the government, 267 asylum seekers currently in Australia could be deported to the Pacific island of Nauru.

The group includes 39 children as well as 33 babies who were born in Australia.

The government has shifted the goalposts during the case by passing retrospective legislation with broad political support.

Tom Clarke, Human Rights Law Centre

Most of the 267 refugees were taken from Nauru to Australia for specialist medical care and have been living in limbo while waiting for the High Court to rule on the legality of the Nauru centre.

The legal challenge will focus on whether Australia can constitutionally fund offshore processing centres.

The Australian government has sought to convince the court that it is legally entitled to send asylum seekers to Nauru and that it is not responsible for the people housed there, despite spending more than AUD$1bn ($700m) for running two offshore centres.

The government has passed retrospective legislation in an attempt to hold off the challenge. In June 2015, laws were passed with bipartisan parliamentary support that made the funding of the centres legal.

In October 2015, just two days before the High Court was due to hear legal arguments in this current case, the Nauru Centre was "opened", allowing asylum seekers free movement around the island.

The asylum seekers were no longer officially detained, thus distancing the Australian government from any claims of illegal detention.

Tom Clarke from the Human Rights Law Centre (HRLC), which has brought the challenge to the High Court, said that whatever the judgment, asylum seekers would be unlikely to be able to stay on the Australian mainland.

"They are all at risk, whether we win or lose," Clarke told Al Jazeera.

Families separated by Australia asylum policy

"The government has shifted the goalposts during the case by passing retrospective legislation with broad political support."

If the High Court decision goes against the government, it is possible that asylum seekers may be moved to Christmas Island, an Australian territorial island closer to Indonesia that the Australian mainland.

The Christmas Island detention centre was the scene of riots in November last year.

If the decision is handed down in favour of the government, the first of the 267 asylum seekers could be deported to Nauru as soon as Saturday.

"The High Court's decision may have significant implications for Australia’s off-shore processing regime, but whatever the outcome, it will be up to Prime Minister Malcolm Turnbull and his Immigration Minister to decide the fate of our clients," Daniel Webb, the director of legal advocacy at HRLC, told Al Jazeera.

"The stroke of a pen is all it would take for Mr Turnbull to do the decent thing and let these families start rebuilding their lives in safety."

Source: Al Jazeera