In a major respite to immigrants flocking to Australia, the new Labour government there has decided detention would be only a last resort measure.
The majority of asylum seekers will no longer be detained under major immigration reforms announced by Immigration Minister Chris Evans Tuesday.
While the government would not completely scrap mandatory detention, the Department of Immigration would have to justify why a person should be detained.
"A person who poses no danger to the community will be able to remain in the community while their visa status is resolved," Evans said and declared indefinite detention was not acceptable.
"Labor rejects the notion that dehumanising and punishing unauthorised arrivals with long-term detention is an effective or civilised response," he said.
"Desperate people are not deterred by the threat of harsh detention - they are often fleeing much worse circumstances."
Mandatory detention will now apply to three groups that the Minister says pose a risk to the wider community, such as those who have repeatedly breached their visa conditions or those who have security or health risks.
"Once in detention a detainee's case will be reviewed every three months to ensure that the further detention of the individual is justified," Senator Evans said.
Children will also no longer be detained.
Asylum seekers who arrive at Christmas Island will still also be detained for health and security checks and will also continue to be processed at Christmas Island.
However, they will now have access to legal assistance.
The Department will now also review the cases of all detainees.
Evans believes the policy of mandatory detention has damaged Australia's reputation within the international community.
"A great deal more work needs to occur to develop a modern and robust system for management of people in immigration detention," he said.
However, he hastened to add, even while adopting a humanitarian approach to the immigration problem, border protection still remained a priority for the government and it would continue work with countries to the north to stop people smuggling.
Refugee Advocate Marion Le says she hopes this means most detainees will eventually be able to be released into the community.
"My understanding would be that he's actually looking at releasing all people who are now detained except those who pose a verifiable, I hope, risk to the Australian public or to security," refugee advocate Marion Le told ABC Radio's AM.
"A lot of people are there for what we would all think are pretty minor breaches of immigration law that are very complex and that most people can't get across.
"I welcome any move by this Government to overcome the years of callous misdirection and abuse, absolute abuse of human beings by the Howard government during the years of the mandatory detention regime," she said.
Lawyer George Newhouse has applauded the move, saying it would mark the end of a sad immigration policy.
"It was a disgraceful period of immigration policy which was calculated to destroy people's lives," he said.
"It really was quite an abusive system. People's lives were destroyed under this immigration regime."