A Nelson lawyer says his 15-year-old client should never have been held in police cells for six nights and it should be illegal.
John Sandston said the boy was arrested last Wednesday on a burglary charge. It was too late to go before the courts so he was held in custody at the Nelson police station overnight.
The next morning he was declined bail and held in custody overnight again. It was intended he'd go into Oranga Tamariki custody on Friday but there were no beds available at any youth residencies nationwide.
On Friday he was declined supported bail, and he remained in custody through the weekend and Monday evening as there were still no beds available.
On Tuesday a judge ruled it was untenable for the boy to remain in custody any longer.
He was granted supported bail, with a local marae providing supervision and support to keep him out of trouble.
"I have no complaint about the way the police or the judge dealt with it, the social worker was excellent in trying to sort the matter out," Mr Sandston said.
"The problem is resourcing, this has been going on for many many years...from time to time there are no beds available nationally in any of the residencies, which is pretty shocking when we don't have the same problem with adults."
Mr Sandston said the practice should be made illegal, to force Oranga Tamaraki to resource the issue to ensure young people weren't held in custody long term.
"It is necessary sometimes to hold a kid for one night, for example at night or an afternoon and it's too late to go before a court...equally if the court has remanded you into custody in Oranga Tamariki's care and it's too late to get a flight."