Facing allegations that it improperly warehoused foster children at North Star psychiatric hospital in Anchorage, the Alaska Office of Children's Services has been ordered by a state Superior Court judge not to keep children at the facility for indefinite periods of time.

The order is part of a preliminary injunction issued by Superior Court Judge Erin Marston that said a minor, admitted to the acute psychiatric hospital during an emergency, cannot remain there longer than 30 days without court approval.

But that length of time may change. As a next step, the judge has asked parties in the case to offer recommendations on the appropriate period of time a minor should be kept at the hospital before a court can weigh in.

The case was brought a year ago by the Southwest Alaska tribal governments of Hooper Bay and Kongiganak on behalf of the tribes' children.

Alaska Legal Services, representing the tribes, argued that the state was improperly placing and holding children in the hospital. It provided examples of three Alaska Native teenage girls from two foster families who had been held at the hospital for at least four weeks without a judge's approval, though their admission was based on questionable evidence.

One of the girls, a teenager referenced as C.A. for her initials, was held at the hospital for about a month, though a hearing judge later found there was no evidence supporting the decision to send her there, wrote Marston.

"OCS decided to send C.A. to North Star, although the reason for this decision is unclear," Marston wrote.

Marston's Feb. 12 preliminary order said that indefinite stays by children at North Star may violate U.S. constitutional rights and lead to "irreparable harm."

"Continuing treatment of foster children without a judicial hearing raises the question of a violation of the fundamental right to due process," he wrote.

The hospital provides a secure, locked facility where 24-hour services are given under the care of psychiatrists to children with severe emotional and behavioral disorders, he wrote.

But long, unnecessary placement at a mental hospital is not good for adolescents, said Jim Davis, the attorney arguing the case for Alaska Legal Services.

"This is not to say North Star is 'One Flew Over the Cuckoo's Nest,' but a mental hospital is not a good place for kids" with typical teenage behaviors, said Davis. "It can disempower and otherwise undermine a kid's sense of self if they don't really have a mental illness requiring them to be there."

North Star Behavioral Health System was a defendant in the case along with Christy Lawton, OCS director. Like OCS, North Star must change its practices because of the preliminary order, Davis said.

Officials representing and working for North Star did not return phone calls seeking comments.

Though the case is not settled, the judge's preliminary order is in part a victory for the tribal governments. But the judge also dismissed some of their claims.

"The plaintiffs' essential claim is there had to be a court hearing before admission to an emergency care facility, and that was rejected," said Steven Bookman, an assistant attorney general in the state's child protection section. "If anything, I see this as a loss for the plaintiffs."

Davis, however, said the tribes have been vindicated. "This is no longer business as usual for OCS," he said.

Bookman said that in May 2013 the state adopted a policy calling for court hearings to be held "very quickly" to determine if children should continue staying at the hospital.

Davis said that step was taken after Alaska Legal Services sent a letter to state officials arguing for timely hearings and threatening a lawsuit. By then, the three girls had already been improperly housed at the hospital and released, he said.

The state's policy was insufficient because it proposed no timeline, leaving that up to the scheduling of the courts, Davis said. Getting a hearing can take far too long, sometimes leaving a child in the mental hospital long after they should have been released, said Davis.

The girl had caused alarm after it was believed she had overdosed on antidepressants, leading to a trip to the hospital emergency room in the hub city of Bethel. There, the girl showed no physical signs of overdosing and the girl's foster mother found the bottle of pills the next day.

The girl's foster mother also found a kitchen knife under a bed in the girl's room, though it was uncertain how the knife got there, Marston wrote.

"OCS appeared to believe that the knife was a threat to C.A. and/or others, although (a hearing judge) could not determine who had put the knife under the bed or why it was there," Marston wrote.

The girl was released immediately after a Superior Court hearing in Bethel, but only after she had been at the North Star psychiatric hospital for 31 days, said Davis.

Another example involved two Alaska Native teenage sisters who came from the same foster home, called D.S. and J.S. in the case for their initials.

The girls' foster mother had refused to keep the girls in her home because they had been "disruptive" and attempted to avoid treatment and spread their scabies, Marston wrote, referring to an itchy and contagious skin disease caused by mites.

The state had tried to place the girls in a therapeutic foster home, but none were available.

"The OCS worker called several facilities, but North Star hospital was the only one available that weekend to take the girls," Marston wrote.

The state OCS worker had recorded in her notes that the hospital apparently accepted the girls to stabilize their scabies, Marston wrote. A psychological evaluation by the hospital found J.S. was admitted for "increasing aggression, high-risk behaviors and impulsivity."

D.S. was held for 38 days, while J.S. was held for 47 days, Davis said. They were released after a Superior Court judge said they shouldn't be there, he said.

"The process isn't working when it takes weeks and weeks to have a hearing," Davis said.

In his order, the judge wants the parties by March 12 to recommend the appropriate length of time to hold minors before a court can weigh in.

Davis said he will argue that minors, just like adults, should not be involuntarily held longer than 72 hours without a court's input. That is more than enough time to determine whether a minor is being improperly held at the hospital, he said.