Such policies may seem like a quick win with some domestic constituencies, but they are not wins in the long run.

Conducting Amnesty International’s investigation on Nauru, one of the island nations where Australia sends its unwanted refugees, I felt furious and desperate.

I was furious to see hundreds of women, men and children subjected to physical and psychological harm that could only be characterised as torture: They were attacked, held in inhumane conditions, deprived of vital medical help and driven to insanity, self-harm and suicide. On Manus Island, in Papua New Guinea, my colleagues witnessed a similarly shocking situation.

I felt desperate because, despite overwhelming evidence of the abuse, for years Australian authorities continued to claim – with no evidence – that the policy of sending asylum seekers to remote offshore locations is the only way to save lives by deterring people from trying to reach Australia’s shores. They did not seem prepared to move an inch.

Yet the work of a formidable alliance of people detained on Manus and Nauru, international and Australian civil society organisations, investigative journalists, as well as Australian human rights lawyers, might finally be bearing fruit.

Last week, Prime Minister Scott Morrison’s government suffered an unprecedented defeat, as Parliament passed a law making it easier for refugees from offshore locations to receive medical treatment in Australia. This may not sound like a ground-breaking development, particularly since the government now intends to reopen a detention centre on the Australian territory of Christmas Island.

But the law’s significance is clear when you consider that for years, Australia’s ministry of immigration refused to transfer even critically ill patients from Manus and Nauru to Australia – saying it would be easier for them to get legal assistance and stay in the country.

On Nauru, in 2016, I spoke to an elderly man who was briefly evacuated to Australia after suffering a heart attack. He was promptly sent back to the island against the doctor’s advice – and subsequently suffered another heart attack, as the doctors had feared.

I interviewed other refugees suffering from cancer, diabetes, untreated fractures, gynaecological problems and many other conditions, none of which could be treated on the island – and all of them were refused a transfer for treatment. That is not to mention those, including children, who suffered from such serious mental health issues that they were repeatedly trying to kill themselves or ended up locked up in an improvised mental hospital – but again, not allowed treatment in Australia.

On Manus Island, an Iranian asylum-seeker, Hamid Khazaei, died because Australian officials ignored the pleas of his doctors for his immediate transfer to receive medical care on the mainland.

The new law will literally save lives. And it is another sign that Australia’s long-standing “offshore detention” policy is slowly being whittled away as it is exposed, time and again, for what it is: a vicious attack on people for the simple act of having sought sanctuary.

Only a few weeks ago, the government of Australia confirmed that all children would be leaving Nauru. Several hundred refugees have already settled in the United States under a deal signed between the two countries. One after the other, companies that the Australian government relied on to run its offshore detention system withdrew, and finding new ones proved to be hard as businesses worried about the reputational damage from complicity in such blatant abuse.

Perhaps equally significant is the international recognition of the very people that the Australian government tried to make invisible, delegitimise, silence, and deprive of agency and hope.

One is Kurdish Iranian writer Behrouz Boochani, a refugee on Manus, who earlier this month won the $25,000 non-fiction prize at the Victorian premier’s literary award, as well as the $100,000 Victorian prize for literature. No Friend but the Mountains was his first book, which he wrote by text messages from the detention centre on the island.

The other is Behrouz’s fellow detainee from Manus Island, Sudanese human rights defender Abdul Aziz Muhamat, who last week won the prestigious Martin Ennals Award for Human Rights. Aziz has worked continuously to advocate for humane living conditions and adequate medical care on Manus, including through mass peaceful protests.

All of these developments indicate that the Australian government’s “offshore detention” policy has utterly failed. The only way to avoid further suffering for the refugees and shame for the country is to put a decisive end to it, accept responsibility, and do everything possible to rebuild hundreds of lives affected by years of abuse.

There is also an important lesson here for other countries who might be looking at Australia’s policy as an example of how to stoke fear about – and among – people seeking safety. Such policies may seem like a quick win with some domestic constituencies, but they are not wins in the long run. Ultimately they are inhumane, unlawful, unsustainable, costly, and damaging to a country’s reputation.

The views expressed in this article are the author’s own and do not necessarily reflect Al Jazeera’s editorial stance.