Australia and Papua New Guinea remain at loggerheads over the destinies of the 905 men held on Manus Island.

Both countries claim the refugees and asylum seekers in detention are the other’s responsibility, while their illegal detention continues essentially unchanged.

In a withering 5-0 decision this week, the PNG supreme court ruled the men’s detention was – and is – illegal. It ordered: “Both the Australian and PNG governments shall forthwith take all steps necessary to cease and prevent the unconstitutional and illegal detention.”

In response to the decision, PNG prime minister, Peter O’Neill, said he would “immediately ask the Australian government to make alternative arrangements for the asylum seekers”.

But Australian immigration minister, Peter Dutton, has maintained the men on Manus are the responsibility of PNG.

And on Friday he said it was possible for the detention centre to remain open in an altered form. “The supreme court in PNG didn’t order for the regional processing centre to be closed.”

The men on Manus, about half of whom have been recognised as refugees, remain in detention.

Some internal gates between compounds, but within the main perimeter fence of the detention centre, were briefly opened, allowing refugees to mix with other refugees, and asylum seekers with other asylum seekers. But the two cohorts cannot see each other.

A move to an “open” centre would seem to be an impossibility, because the detention centre is within a PNG naval base. Those held inside would not be allowed free movement in and out.

Christmas Island and Nauru have been speculated as possible destinations for the men, but the government has refused to entertain this beyond said that Nauru had “capacity”.

New Zealand, which has a standing offer to accept 150 refugees from Australia each year (an agreement with the Gillard government which Australia has since abandoned) has said it would take men from Manus.

But Australia has rejected this, with Dutton saying a move to New Zealand would be a “backdoor to Australia and a green light to people smugglers”.

“The starting point for our government, is that these people will not be coming to Australia.”

The Manus detention regime faces a fresh legal challenge next week, with the possibility the supreme court in Port Moresby could order that the men held on Manus Island be compensated for their three years of illegal detention.

The memorandum of understanding between PNG and Australia explicitly states that “all costs” of offshore detention be borne by Australia.

Australia could be liable for the entirety of any compensation order, which could run to hundreds of millions of dollars for nearly 1,000 men held more than 1,000 days, according to the PNG lawyer bringing the case, Ben Lomai.

A mooted deal between PNG and New Zealand to move the men from Manus to NZ would be diplomatically controversial because it would directly defy Australia’s entrenched policy position of never allowing a boat arrival to reach Australia (New Zealand citizens can travel freely to Australia).

Australian and New Zealand relations have strained over Australia’s hardline immigration approach, but the nations remain close. PNG is Australia’s largest aid recipient and hugely dependent on Australia’s economic and political support.