The verdict is in. After three years of false starts and halting progress, the Supreme Court of Papua New Guinea has delivered judgment in a landmark case striking at the core of Australia's offshore processing regime in PNG. The ruling is clear and unanimous: the detention of 900 men at the Australian-built facility on Manus Island is illegal, unconstitutional and must end immediately.
The judgment confirms what we already knew. Since its earliest days, everyone from doctors to security guards warned that something was not right at the remote, fortified facility. Australian and international observers questioned why vulnerable people were being detained there at all, why there was no oversight or transparency, and why every aspect of the detention regime was shrouded in secrecy. 
Two young men have died as a result of their illegal detention. Women and young children spent up to seven months in grossly inadequate conditions, before being brought back to Australia in mid-2013 without ever being processed. Rumours of gang rape, death threats and torture in a secret compound have proliferated, without ever being properly investigated. Meanwhile many of those who worked at the Manus detention centre - young Australians and hardened professionals alike - have returned deeply affected by what they saw offshore.
Asylum seekers, staff and international experts have all appealed to Australia to bring its immigration policies into line with international law, but their cries have fallen on deaf ears.
This week's judgment does not just sound the death knell for detention on Manus Island: it is a scathing indictment of how the governments of Australia and PNG have conducted themselves since 2012. The court reminds these countries that depriving a person of their liberty is a serious act, permissible only in accordance with valid laws, and to the extent it is necessary and justified.
Australia now has a choice. This judgment could mean a number of things for the 900 men still inside the Manus detention centre, and the handful of others "settled" in the PNG community.
An optimistic person might expect freedom, for every asylum seeker and refugee on Manus to be released this week, and supported in the community while any outstanding claims are finalised and permanent solutions are found.
Logistically, the outcome is likely to be more complicated.
As an immediate move, the Australian and PNG governments could declare the Manus centre "open" . This was the approach taken on Nauru in   October, just days before the High Court of Australia began to hear the case challenging detention on that island.
But the situation on Manus is not as simple. The Manus centre is on an active naval base, at least half an hour's drive from the town of Lorengau, in an area where land use and ownership are charged issues. Any proposal for completely unrestricted movement in these parts would likely trigger considerable concern on the part of Manus residents and the military.
Moving the men to the transit facility closer to Lorengau is an equally fraught option. Despite the hardships of detention, the vast majority of men recognised as refugees on Manus have refused to be relocated to this facility, despite the freedom and better living conditions. Whether from fear of being attacked, or because they do not wish to co-operate with their settlement in PNG, these men have long resisted pressure to move on. They are unlikely to change their stance now.
It is suggested the men be taken to Nauru, but that country already faces significant problems with refugee integration, and would provide no long-term solution for those men found to be refugees.
Which leaves Australia as the only reasonable option. The men on Manus should be brought back to the country in which they first sought asylum. It would then be for the government to decide whether to release them into the community on bridging visas or hold them in detention since, unlike in PNG, asylum seekers in Australia have no constitutional right to freedom (although they should still benefit from this right under international law).
After the judgment, Immigration Minister Peter Dutton was quick to trot out the same old line. "No one who attempts to travel to Australia illegally by boat will settle in Australia," he declared, dismissing the ruling as "a matter for the PNG government". But this is not the time for mantras and responsibility shifting. The PNG judiciary has invited Australia to reconsider its approach to people seeking protection and to bring its asylum policies into line with international law.
They have set the standard, now the ball is squarely in Australia's court. What happens next is up to us.
Madeline Gleeson is a research associate at the Andrew & Renata Kaldor Centre for International Refugee Law. Her book Offshore: Behind the Wire on Manus and Nauru is out now.