OLYMPIA, Wash. — Editor's note: The Washington state House advanced the bill on Feb. 13 

A bill to ban the use of solitary confinement as a punishment for juvenile offenders passed out of a Senate committee Tuesday.

Senate Bill 6112 would allow teens to be placed in isolation cells only if they are deemed a danger to themselves or others.

Facility administrators would have to document when the cells are used, why and for how long under the bill requested by Washington Attorney General Bob Ferguson.

“There are ways to confine someone for their safety that are appropriate,” said Ferguson. “There needs to be accountability for why someone’s placed alone but not in ‘the hole' for days, weeks, even months at a time. It makes no sense.”

RELATED: Washington senator 'shocked' by prison body scanner policy

Facilities like Thurston County’s juvenile detention center no longer place offenders in isolation as a form of punishment.

Offenders are sent alone to rooms with surveillance cameras only if they are considered a risk to themselves or others, said Thurston County Juvenile Court Administrator Mike Fenton.

He said the county determined isolation put the offenders through unnecessary stress, hurting their chances at rehabilitation.

“Putting a kid in isolation status and just leaving them there is not going to do that. It's going to make it worse,” said Fenton.

Ferguson said a number of county facilities still use solitary confinement, but because there are no requirements for documentation, he did not know how many.

During a legislative session last month Rep. Tom Dent, R-Moses Lake, raised concerns about banning facilities from using solitary confinement for juveniles.

"I hate to take all the their tools away when we might need one,” said Dent.