Australian Prime Minister Julia Gillard has hit out at a High Court decision that ruled an asylum deal with Malaysia was unlawful.
Ms Gillard called the ruling "deeply disappointing" and said the court had "rewritten the Migration Act".
Under the deal, Australia would have sent 800 asylum-seekers to Malaysia and would have received 4,000 refugees in return over four years.
But the court ruled Malaysia did not offer adequate protection for refugees.
The decision was an embarrassment for Ms Gillard's government, which had sought to appear tough on asylum.
But human rights activists in both Malaysia and Australia have welcomed the news.
Speaking in Brisbane, Ms Gillard said that the court ruling "turns on its head the understanding of the law in this country", ABC News reported.
"Yesterday the asylum-seeker and refugee law of this country changed - changed from how it had been known and understood before with a different interpretation," she said.
She said that the government would await advice from Solicitor-General Stephen Gageler before proceeding, but warned of a possible spike in asylum-seekers arriving by sea in the wake of the ruling.
The "Malaysian Solution" would have seen up to 800 people arriving "irregularly" in Australia by boat after 25 July transferred to Malaysia for "refugee status determination".
There they would join a queue of refugees already seeking resettlement.
Meanwhile, Australia would have expanded its intake of refugees to include a further 4,000 refugees who entered Malaysia before 25 July.
This was supposed to send a tough message to boat people that they would not be processed in Australia and they would not receive "preferential treatment" over other asylum-seekers.
But the court ruled that the exchange was illegal as Malaysia, which is not a signatory to the UN convention on refugees, offered inadequate legal protections for asylum seekers.
It said Australia would fail to meet its international obligations under the terms of the deal.
'Expensive and harmful'
Ms Gillard said that the ruling could impact on Australian proposals to send asylum-seekers to re-opened processing camps in Papua New Guinea or on the Pacific island of Nauru.
"It is far from clear whether the court's ruling would, practically speaking, permit the operation of offshore processing in other locations, even in locations where offshore processing has been conducted in the past," she said.
The Greens - on whom Ms Gillard's minority government depends for support - have welcomed the ruling, with Senator Sarah Hanson-Young urging the government to move away from "expensive, harmful and illegal" offshore processing.
Malaysian activists have also praised it, calling on Kuala Lumpur to sign the UN convention on refugees and raise accommodation standards.
Refugee advocates in Australia, meanwhile, have called on the government to accelerate processing of detainees' asylum claims.
Australia currently detains all asylum-seekers arriving by boat, including several hundred in a centre on Christmas Island which has seen riots in recent months.