On the night of Sept. 11, 2015, security cameras in a prison in Goulburn, a city southwest of Sydney, recorded a final, desperate act.

A dark pool of blood and water spilled out from underneath a locked cell door. Alone inside, Junior Togatuki, 23, was bleeding heavily from a cut to his left wrist. He had sounded the alarm twice, but no one had come to his aid.

Mr. Togatuki, a New Zealand citizen of Samoan descent who had moved to Australia when he was 4 and who had a history of mental illness, was found dead the following morning.

He had been due to be deported.

The cancellation of Australian visas on the grounds of “character” has soared since December 2014, when the government amended its immigration law. Last year, more than half of those visas belonged to New Zealanders, almost 1,300 of whom have been deported since January 2015. They are now the largest group in Australia’s immigration detention centers, whereas before the legal changes New Zealanders were not even in the top 10.