A Nibok refugee settlement on the Pacific island of Nauru in September 2018. (Jason Oxenham/Pool Photo via AP)

David Manne is executive director of Refugee Legal, and Kate Fitzgerald is a lawyer at Refugee Legal.

While the United States continues to grapple with the ongoing detention of children at the southern border, another child detention crisis on the other side of the world is coming to an end — for now. Last week, the final four refugee children held on Nauru at the behest of the Australian government have been approved for evacuation and resettlement to the United States under a deal struck with the Obama administration in 2016.

They are the last of more than 200 children who have been trapped in cruel limbo for years on the Pacific island. These children — along with their families — arrived in Australia by sea, seeking safety as refugees. Many of these families fled from extreme brutality and oppression in countries such as Afghanistan, Iraq, Pakistan, Somalia and Iran. But instead of finding safety and security, they were detained for "offshore processing" in Nauru and Papua New Guinea under Australia's hard-line immigration policies designed to deter others from coming by boat.

Since 2012, Australia has implemented a lifetime ban on resettling refugees arriving into the country by boat. People arriving by boat seeking asylum have been barred from applying for protection in Australia and either turned back at sea or forced to offshore processing, in flagrant breach of the 1951 Refugee Convention.

As a result, children fleeing to Australia by boat have been forced to spend their formative years subjected to conditions that organizations such as the United Nations Refugee Agency, Human Rights Watch and Amnesty International have consistently judged to be violating fundamental human rights. At least 46 children were born into these deeply inhumane and degrading conditions, effectively funded and controlled by Australia to the tune of billions of dollars. They have known no other life.

The full depth of the damage wrought is not yet known. But we do know that there are children who came to introduce themselves by their ID number and not their name. We know that there are children who stopped playing and going to school and felt such despair that they refused fluids and food. We know that there are children who spent their time Googling how to kill themselves. We know there are children who self-harmed. We know that at least one child begged to die rather than remain in Nauru.

We know that one child even tried to set herself on fire.

These children were subjected to conditions so brutal that many simply withdrew from the world around them. Medical experts identified the outbreak of a rare psychiatric condition known as resignation syndrome.

This is the human face of what happens when successive governments lock themselves into policies of deterrence that prioritize protecting borders at the expense of protecting people.

The fact that these children have finally all been evacuated from Nauru is a welcome and long-overdue step. But it was only achieved through the unceasing collective efforts of human rights advocates, health professionals, lawyers, teachers, charities, U.N. agencies, a growing number of parliamentarians and concerned members of the community. They have raised their voices, documented and disclosed the abuse and provided critical medical care. In many cases, pro-bono lawyers had to fight tooth and nail in the Australian courts to force the government to urgently evacuate desperately ill refugee children. With all this advocacy, we have seen a shift in public opinion reflecting a growing disquiet about the damage done to these children.

Yet there’s more work to be done in order to end this abhorrent chapter in Australia’s history.

The situation for the estimated 1,000 people still marooned on Nauru and Papua New Guinea is nothing short of a humanitarian crisis. With no viable prospects for resettlement on the table, hopelessness and despair only deepen. Self-harm and suicide attempts are rife. Experts continue to warn that lives are at stake.

It is clear that this experiment in human warehousing has failed, and the human and financial costs are incalculable.

Immediate action must be taken to end offshore processing and evacuate all of the people still held under offshore processing to Australia — or other countries such as the United States or New Zealand — where they can begin to rebuild their lives. This week, the Australian parliament is voting on a bill to allow for medical transfers without legal intervention, which if adopted, would be another promising step to ensure the evacuation of those in dire medical need. At the time of publication, the bill has passed through the House of Representatives and next will be up for vote in the Senate.

But change must not stop there.

Immigration policy is immensely complex and challenging. There is no magic bullet. But going forward, Australia can and must develop a plan for refugees that has humanitarian outcomes at its heart. It must end its deterrence and detention strategy and instead treat asylum seekers in accordance with its obligations under the Refugee Convention. It must focus on the plight of people seeking asylum in the Asia-Pacific region — not on how to stop them getting to Australia, but on the root causes of why they’re trying to get there in the first place.

Australia, in partnership with its regional neighbors, should focus on developing a cooperative framework for protection in the Asia-Pacific for millions fleeing from war and persecution. The billions spent on the misery of offshore processing should instead be invested in working with countries hosting refugees in the region, such as Malaysia and Indonesia, to share the responsibility for rescuing, processing fairly, humanely hosting and resettling refugees. Australia should also lift its refugee resettlement intake, prioritizing the most vulnerable.

Whether at the United States’ southern border or in Australian coastal waters, when protection of borders is prioritized over the protection of people, it’s not just rights and lives that are endangered. So, too, are the hearts and souls of nations.

Read more:

Richard Glover: Why the Trump phone call could be a very good thing for us Australians

Elaine Pearson: Australia’s harsh refugee policy is no global model

Nick McKim: Australia’s migrant catastrophe is proving Trump right