A man was left "cold, hungry and terrified" after he was forgotten in a cell for 48 hours over the weekend.
The 59-year-old was left by police alone in a holding cell at Masterton District Court from Saturday morning until Monday morning, when he was finally discovered.
During that time he had no food, and no bedding.
Police have now apologised to the South Wairarapa man, who has name suppression, along with his family.
Wairarapa's top police officer has also vowed to find out how the incident came about, and has notified the Independent Police Conduct Authority.
Susie Barnes, lawyer of the man, said her client had spoken of the "awful" experience.
"He described it like torture. It caused him serious mental anguish," she told the Wairarapa Times-Age.
"They forgot about him, for about 48 hours he had nothing."
She said the court holding cell was a small concrete room, and was not intended to hold people overnight.
"There's no mattresses or chairs.
"There's one of those stainless steel lidless toilets, but there's no toilet paper.
"There's a tap so he had water but no food, no blankets, no human contact - no nothing, he was just forgotten about."
Barnes considered her client "a vulnerable member" of the community and said he appeared to have been "quite damaged" from the experience.
"He told me that he felt abandoned, he'd had suicidal thoughts, he was cold, hungry and terrified.
"It's really appalling, and I think that's been acknowledged by everyone involved."
She said her client had no way of telling "how much time was passing, or when an end would finally come".
"There were lights on, but very little natural light.
"He said he could look through a key hole and see some natural light that was in the corridor from a small window."
Barnes said she had heard about the incident involving her client directly from the police, who had been "really apologetic".
The man had been awaiting a sentence on a drink driving charge and was on bail.
But on Friday night he was found to have breached one of his bail conditions and was subsequently arrested and held in custody overnight in cells at the Masterton Police Station.
He appeared in the Masterton District Court on Saturday morning, and was granted bail by the sitting Justice of the Peace.
The man was taken into the court holding cells while the bail document was prepared.
Wairarapa Area Commander Inspector Donna Howard said the man was discovered by police and court staff on Monday morning.
"He was immediately seen by a doctor and then returned home to his family," she said.
"The priority is to determine how this happened and to continue to support the man and his family.
"Police have apologised to the man and his family for the distress caused."
Howard said police were working with the Ministry of Justice, and the matter had also been to the Independent Police Conduct Authority.
Police Minister Paula Bennett said what the man had gone through was "not acceptable".
She said she was aware that the IPCA had been notified of the incident, and police had ordered an internal investigation, to which she was keenly awaiting the outcome.
"I note that police have apologised to the man for the distress caused and continue to support the man and his family."
A spokesperson from the Ministry of Justice said "as the owner of the building, the Ministry of Justice will work with Police to investigate the circumstances".
Lawyer Michael Bott, who specialises in civil liberties cases, said the incident was "deeply regrettable and deeply concerning".
"When the state basically gives you the power to detain people, there is a parallel duty to do so responsibly and to take account of them and know where they are."
Bott said any person granted bail had the right to be released promptly, after that decision had been made.
He said people who had been detained by the police were "extremely vulnerable".
"You're reliant on them for your food and water, for sustenance and warmth.
"In this case here, the fact that they have forgotten about him is lamentable and it is a breach of the Bill of Rights Act - it doesn't have to be a deliberate breach."
Bott said and it was important that something of a similar nature did not happen again.
"The worrying thing is, had he had some kind of medical condition - needed medication, had a cardiac arrest, had diabetes - this could have been a significantly more serious case than it was."
He said it was "heartening" to know that police were working with the Ministry of Justice to make amends.
- Wairarapa Times Age