The toll among Burmese, Sudanese, Somali, Lebanese, Pakistani, Iraqi, Afghan, Syrian, Iranian and other migrants is devastating: self-immolation, overdoses, death from septicemia as a result of medical negligence, sexual abuse and rampant despair. A recent United Nations High Commissioner for Refugees report by three medical experts found that 88 percent of the 181 asylum seekers and refugees examined on Manus were suffering from depressive disorders, including, in some cases, psychosis.

The world’s refugee crisis, with its 65 million people on the move, more than at any time since 1945, knows no more sustained, sinister or surreal exercise in cruelty than the South Pacific quasi-prisons Australia has established for its trickle of the migrant flood.

Australia, like Europe but on a much smaller scale, faces a genuine dilemma: What to do about desperate migrants trying by any means to gain asylum? Their journeys across the world have fueled rightist movements in many developed societies. Anxiety, whether related to jobs or terrorism, is high and, as Donald Trump demonstrated, scapegoating is effective. Approaches to the crisis have varied. Angela Merkel, the German chancellor, has taken in more than a million. But the Australian government argues that toughness is the only way to prevent the country from being overwhelmed.

It has “stopped the boats” and the Indonesian smugglers behind them: This is the essence of Australia’s case. The government says it has prevented deaths like those in the Mediterranean, where more than 4,000 migrants have drowned this year. By turning back the “queue jumpers,” a phrase that resonates in a nation devoted to a “fair go” for all, it has safeguarded Australia’s right to select who gets to people a vast and empty country. The official vow that those marooned on Manus and Nauru will never live in Australia has assumed doctrinal vehemence.

In Peter Dutton, the immigration minister, the country has its own little Trump. Last May he portrayed the asylum seekers as illiterates bent on stealing Australian jobs, and he has suggested “mistakes” were made in letting in too many Lebanese Muslim immigrants. His soft bigotry resonates with enough voters to sway elections.

At the same time, Manus and Nauru are a growing embarrassment to Australia, a party to all major human rights treaties. “There is an increasing realization that this is unsustainable,” Madeline Gleeson, an Australian human rights lawyer, told me.

Prime Minister Malcolm Turnbull knows this and needs a way out. After Omid Masoumali, a young Iranian, burned himself to death on Nauru this year, a cartoon by Cathy Wilcox captured Australia’s shame. Above a man in flames was the caption “Not drowning.”