The saga of Australia's controversial offshore refugee detention centers took an unexpected turn Tuesday when the Supreme Court of Papua New Guinea ordered that the biggest facility, on its Manus Island, be closed.

Between 2010 and 2014, Australia saw a huge influx of refugees — many from Afghanistan, Iran and Bangladesh — attempting sea journeys. The government responded by aggressively implementing its "Pacific Solution," through which "boat people" were picked up by the Australian military before landing and relocated to detention facilities. Twelve facilities are in Australia, and its government also holds refugees on the minuscule, eight-square-mile island of Nauru, and on another sparsely inhabited island that is part of Papua New Guinea (commonly referred to as PNG). All the facilities are operated by private security contractors.

The detention center on Manus Island, once likened by an Australian opposition politician to a "gulag," is now home to 900-odd male asylum seekers. Over the past few years, it has witnessed a slew of horrific incidents including riots, prolonged hunger strikes, and dozens of gruesome suicide attempts, some involving the swallowing of razor blades or scissors. In one incident, PNG police and local gangs allegedly infiltrated the facility and attacked detainees, injuring 77 and killing one Iranian by dropping a large rock on his head. International human-rights activists have decried the volatile conditions on Manus Island while hundreds have languished for years as Australia processes their asylum requests. The PNG Supreme Court said the facility violated the nation's constitution, as detainees were being held against their will in a place they had never tried to immigrate to in the first place.

Australia arguably has the most restrictive immigration control regime in the world, and it has more or less achieved its goal: The flow of boat people has all but ceased. Peter Dutton, Australia's immigration minister, said that PNG's decision "does not alter Australia’s border protection policies — they remain unchanged,” adding that “no one who attempts to travel to Australia illegally by boat will settle in Australia.” 

Last year, Dutton announced that Manus Island detainees whose asylum requests were found to be valid should be resettled in PNG. This has only complicated matters for the detainees, as PNG is wary of local resettlement for fears that refugees will compete for jobs in an economy that is already weak. The new decision to close the facility wasn't accompanied by a timetable, nor any clarity on whether infrastructure assistance Australia promised to PNG as part of the agreement to place the facility there would be discontinued. It is also unclear what will happen to the detainees, who, according to reports from local journalists, were rejoicing after the decision, though some expressed doubt that their situation would be resolved anytime soon.

Meanwhile, in Nauru, a young Iranian man set himself on fire in front of United Nations representatives as they visited the facility. Five suicide attempts were reported in the past few days, and two women have gone missing and are feared to have drowned. At a hearing in the Australian Senate last week, lawmakers were told that more than half of the children who had been held at the camp in Nauru and subsequently moved to Australia are suffering from mental illness.