Amnesty International is calling on the government to end the imprisonment of asylum seekers in New Zealand for good.
Sixteen asylum seekers were held by corrections in 2019.
Immigration NZ says a person may only be detained in a Corrections Facility for up to 28 days at a time, but Amnesty International and the Asylum Seekers Trust say their most recent case was released from prison after three years.
After witnessing many of his family members killed in the decades-long Somali civil war, 29-year-old Yayha escaped and arrived in New Zealand in August last year.
He was imprisoned after claiming asylum at Auckland International Airport.
Yayha said the experience was traumatic. He said he was abused by some of his cell mates, had food taken off him by other prisoners and found it difficult to communicate because he could barely speak English.
"I feel bad but I'm no criminal. I'm not creating problem for other country or this country but this prison is a horrible prison. Sometimes fighting people, all the time fighting, fighting. Too much scary. Some cell mate no good."
Amnesty International advocacy and policy manager Anneliese Johnson said the safety of asylum seekers and their wellbeing can't be guaranteed in the prisons.
It said the organisation had been lobbying the government for years but nothing had been done.
"You know the last 20 years of policy and action on this issue is actually pretty shameful. I think a lot of people would be surprised to know that we have asylum seekers currently in our prisons in New Zealand."
There was an opportunity for change - and given the small number of people involved it was achievable, she said.
After about six months in Auckland's Mt Eden Correctional Facility, Yahya was released.
"One day I'm working in the kitchen, one officer come to me and say "Yahya, today you go out." I said "I don't know where I'm going, I don't have family in NZ. I don't have any friend. Where am I going?"
Corrections staff didn't know what to do with him, Yahya said, so they put him in a taxi and took him to the nearest mosque. From there he went to a Somali shop in Mt Roskill.
"I talk to him and say "I don't have a place to sleep, I don't know where I'm going."
The shop owner got in touch with the Red Cross who contacted the Asylum Seekers Support Trust for help.
Yahya is now living a Trust hostel with 14 others, is taking an English language course four days a week and picks up casual work as a barber.
The Asylum Seekers Support Trust told First Up that Corrections refused to give it information on whether asylum seekers are in its prisons, effectively preventing the Trust from providing support.
In a statement, Corrections said that information was withheld from it under Section 151 of the Immigration Act.
"For this reason, we do not hold comprehensive records about immigration detainees," National Commissioner Rachel Leota said in the statement. "Information relating to the number of asylum seekers who are currently detained is held by MBIE, not Corrections."
Immigration NZ confirmed it did not give Corrections the reasons for a person's detention but said the information was provided to the District Court which granted a warrant of commitment between Immigration NZ and the Department of Corrections.
Johnson says the way both departments are navigating the privacy issue was problematic.
She said they should work to find a middle ground and communicate at least some of the information to agencies who can help and support asylum seekers so they don't end up out on the street.
"We know that there has to be a level of protecting peoples' identity but it shouldn't be used to stonewall the support that is needed to provide to those people who are in detention.
"We're really concerned that those provisions around privacy are being overused and that people can't get the support that they need.
Immigration NZ said in a statement there were only certain circumstances in which asylum seekers were put in jail, for example, if a person was refused entry into New Zealand on arrival and was liable for deportation because they were in the country unlawfully.
The department said a person may only be detained in prison or the Mangere Refugee Resettlement Centre for up to 28 days at a time, on the basis of a warrant of commitment from a District Court Judge.
The Asylum Seekers Support Trust says the average length of time its residents have been detained is about seven months.
And in their most recent case, the person they had been advocating for was finally released after three years.
Johnson said up to three years in prison was very difficult to justify on the human rights standards of least amount of time in detention.
"We've heard some really concerning anecdotal evidence around abuse being experienced by asylum seekers in prison.
"And we know that the impacts on people in detention can be hugely significant both for their mental and physical health."
It's not known how many asylum seekers are currently in prison and Amnesty International is calling on the government to improve its release of data showing the number of asylum seekers detained.
She said government had acknowledged concerns raised by Amnesty and other advocates but given no assurances that it will scrap the policy.
"If we think about who we want to be as a country and who we want to be for people who have led unimaginable horrors in their lifetime and then they turn up at an airport exhausted, bewildered, sometimes traumatised and then we put in then we transfer them to prison, do we want to be that kind of country that is treating people in that way?
"Or do we want to have them in the community where the appropriate support can happen and we can assess those claims properly?
"I think we have a choice to make in this country on how we treat people who are just looking for a safe home..."