A 15-year-old boy spent the night in a police cell in Nelson on Wednesday because Child, Youth and Family (CYF) couldn't find a place for him to sleep.
The Ministry of Social Development confirmed the teenager could not be transferred to a youth residence until Thursday because beds were full.
He had appeared at the Youth Court earlier that day.
In a statement, CYF general manager of residential and high needs Nova Salomen said youth residences had a high turnover, and when beds were full, social workers found alternative arrangements in the community.
"Residences have a high turnover, with young people coming and going every day. At any one time there are likely to be young people transitioning into or out of a residence.
"As in other areas of government activity, such as hospital treatment and education, it is not feasible to have special facilities in every city."
She said if a young person was deemed unsafe, they remained in police cells until a secure bed was found.
Last week another 15-year-old Nelson boy spent three nights in a cell over the Easter break and could not be transferred due to holiday hours.
Ms Salomen said the process of a young person entering or leaving a residence wasn't simple.
"Both typically require a court decision, although police have the power to assign a young person to a residence out of normal working hours."
She said it was rare for a young person to stay in a police cell for more than 24 hours.
A spokesperson for the Ministry of Social Development said the situation arose during a long weekend, and required the co-ordination between the courts, social workers and police to ensure there was a bed for the teenager.
"Checks were completed to ensure the young person's wellbeing while held by police."
He said the boy was moved to a residence on the Tuesday following the three-day weekend.