Child, Youth and Family says a blow-out in the number of girls needing accommodation led to two 15-year-olds spending four nights in police cells.
It says it will look into whether it needs more beds for vulnerable girls and how to handle such situations in the future.
At the Waitakere Youth Court on Tuesday, Judge Lisa Tremewan refused to remand the two girls in police custody for a fifth night, saying it was inappropriate for them and wrong to expect police to look after young people in the cells. The teenagers were moved to another facility.
Child, Youth and Family has 156 beds for youth throughout the country.
General manager for youth justice support Chris Polaschek says in the last 18 months there have been days where there have been 30 beds available nationwide, but in this instance there were no beds available for girls.
"We manage admissions nationally, so we track the stuff really closely. But yes, from time to time we just get pushed in terms of capacity - it's rare, but it does happen," says Mr Polaschek.
Mr Polaschek says there is no national shortage of beds.
Associate Justice Minister Chester Borrows told Morning Report the incident this week was not due to monetary constraints, but was a result of an inflexible system.
Mr Borrows says there were beds available, but they were designated for boys.
He says the review needs to look at how the beds can be better spread, without housing girls and boys in the same unit.
Mr Borrows says there has been an increase in young women needing accommodation and the system needs to be looked at.
Youth law advocacy group Just Speak says something should have been done earlier to address the problem.
Spokesperson Lydia Nobbs says there would have been warning signs of the need for more accommodation for young women.
Ms Nobbs says police cells are inadequate to care for young people in any circumstance, and there should always be an alternative option.