
294 N.W.2d 705 (1980)
STATE of Minnesota ex rel. L.E.A., petitioner, Appellant (50619),
State of Minnesota ex rel. S.P., petitioner, Appellant (50620),
State of Minnesota ex rel. C.S., petitioner, Appellant (50621),
State of Minnesota ex rel. K.H., petitioner, Appellant (50622),
State of Minnesota ex rel. K.H., petitioner, Appellant (50623),
v.
Donald HAMMERGREN, Superintendent, Hennepin County Juvenile Detention Facility, Woodview, Respondent,
Donald Omodt, Hennepin County Sheriff, Defendant (50619).
Nos. 50619-50623.
Supreme Court of Minnesota.
June 20, 1980.
*706 William R. Kennedy, County Public Defender, and Patrick J. Sullivan, Asst. Public Defender, Minneapolis, for appellants.
Thomas L. Johnson, County Atty., and David W. Larson, Asst. County Atty., Minneapolis, for respondent.
Linda J. Gallant, Minneapolis, Coalition for the Protection of Youth Rights, Amicus Curiae.
Heard before SHERAN, C. J., PETERSON, and TODD, JJ., and considered and decided by the court en banc.
SHERAN, Chief Justice.
Petitioners appeal from dismissal of their petition for habeas corpus in the Fourth Judicial District. Petitioners sought habeas corpus claiming they were wrongfully being held in the Hennepin County Detention Center for contempt of court. The lower court reasoned that under Minn. Stat. §§ 260.301 and 588.01, subd. 3 (1978), the court has the power to find status offenders in constructive contempt of court for failing to comply with court orders and that In re Welfare of R.L.W., 309 Minn. 489, 245 N.W.2d 204 (1976) permits confinement in any center authorized by the Juvenile Court Act. Consequently, the lower court found that detention in the secure facility was appropriate and dismissed the petition.
The issue raised by this case is whether, despite the language of Minn. Stat. § 260.173, subd. 3 (1978) stating that wayward children shall be placed in shelter care facilities only, status offenders can be held in secure detention centers after being found in constructive contempt of court for failing to comply with court orders.
Although each petitioner's case presents a slightly different fact pattern, the parties stipulated to the following common factors. At separate times, the juveniles were each charged with being wayward and habitually disobedient within the meaning of Minn. Stat. § 260.015 (1978). Thereafter, they were each charged with constructive contempt of court under Minn. Stat. § 588.01, subd. 3(3) (1978) for violating a court order by running away from a shelter care facility[1] or failing to appear for a hearing. As a result of a finding of constructive contempt of court, each was incarcerated in the Hennepin County Juvenile Detention Center.
The individual juveniles may no longer be held in a secure facility. Normally, this would render the case moot but, we find that the issue raised is "capable of repetition but evading review" and take jurisdiction. Nebraska Press Ass'n v. Stuart, 427 U.S. 539, 546, 96 S.Ct. 2791, 2797, 49 L.Ed.2d 683 (1976); Gerstein v. Pugh, 420 U.S. 103, 110 n. 11, 95 S.Ct. 854, 861, 43 L.Ed.2d 54 (1975); Roe v. Wade, 410 U.S. 113, 125, 93 S.Ct. 705, 712, 35 L.Ed.2d 147 (1973). We make these observations notwithstanding the mootness which moves us to discharge the writ.
Juvenile courts have the authority to find a juvenile in contempt of court and to impose appropriate sanctions. But, given the Legislature's expressed disapproval of the *707 practice of confining status offender juveniles in secure facilities, juvenile courts should not direct such confinement for contempt of court unless they first find specifically that there is no less restrictive alternative which could accomplish the court's purpose.[2]In re Welfare of R.L.W., 309 Minn. 489, 245 N.W.2d 204 (1976); see also U. S. v. Wilson, 421 U. S. 309, 319, 95 S.Ct. 1802, 1808, 44 L.Ed.2d 186 (1975).
Minn. Stat. § 260.173, subd. 3 (1978) was amended by the Legislature in 1978 in Minn. Laws, ch. 637. The statute before the amendment stated that a child taken into custody by reason of being wayward or habitually disobedient who had previously escaped from a shelter care facility might be placed in a secure detention facility. Minn. Stat. § 260.173 (1976). As amended, Minn. Stat. § 260.173, subd. 3 (1978) states that a child taken into custody because of waywardness or habitual disobedience "may be placed only in a shelter care facility" even if she is conditionally released and has violated her field supervision. The language in the former statute authorizing the placement of these children in a secure detention facility was eliminated. The Hennepin County Juvenile Detention Center where these juveniles were incarcerated is a "secure detention facility" defined in Minn. Stat. § 260.015, subd. 16 (1978) as a "physically restricting detention facility, including a detention home."
The amendment brought Minnesota into compliance with the funding requirements of the Law Enforcement Assistance Administration of the United States Justice Department. The Juvenile Justice and Delinquency Prevention Act of 1974 requires that each state seeking funds under the Act submit a plan to ensure that wayward or disobedient children "shall not be placed in juvenile detention or correctional facilities." 42 U.S.C. § 5633(a)(12) (1976).
Minnesota, in adopting the federal policy of deinstitutionalization of status offenders, is moving in the direction adopted by the ABA Juvenile Justice Standards Project, Standards Relating to Noncriminal Misbehavior.[3] The ABA Standards, and their Commentary, conclude that runaway youth, truant youth, and otherwise "incorrigible" or "wayward" youth are best served outside the juvenile court system and outside juvenile detention facilities. As Amicus Coalition for the Protection of Youth Rights rightly points out, once children are defined as delinquent and placed with delinquent law-breakers, they may conform their behavior to that label, thus countermanding the entire process. E. Schur, Radical Non-Intervention: Rethinking the Delinquency Problem, 118-126 (1973). The Legislature may well have determined that removing status offenders from facilities designed for and used for law violators would result in better treatment, better programs, and better services for the child and that child's family. In addition, we interpret the amendment as reflecting the Legislature's concern with the effects of comingling disobedient or wayward children with juveniles who have allegedly committed more serious crimes.
In light of the foregoing, we hold that only under the most egregious circumstances should the juvenile courts exercise their contempt power in such a manner that a status offender will be incarcerated in a secure facility. If such action is necessary, the record must show that all less restrictive *708 alternatives have failed in the past. (See State in Interest of M.S., 73 N.J. 238, 374 A.2d 445 [1977] for other alternatives.)
In L.A.M. v. State, 547 P.2d 827, 831 (Alaska, 1976), the Alaska Supreme Court noted:
Before a party may be held in criminal or civil contempt for failure to abide by a court order, certain elements must be established: (1) the existence of a valid order directing the alleged contemnor to do or refrain from doing something and the court's jurisdiction to enter that order; (2) the contemnor's notice of the order within sufficient time to comply with it; and in most cases, (3) the contemnor's ability to comply with the order; and (4) the contemnor's willful failure to comply with the order.
In order for the juvenile court to find a "willful failure to comply" which warrants a holding of contempt, the record from the previous hearing must show that the child understood that disobedience would result in incarceration in a secure facility. A child too young to comprehend the warning cannot be found in contempt of court. With these limitations, the juvenile court can resort to the use of the secure facility if absolutely necessary.
Finally, if it is necessary to rely on the use of a secure facility, the order must include instructions to the administrator of the institution that the disobedient child's contact with the more committed juvenile be kept to a minimum.
Writ discharged.
WAHL, Justice (concurring specially).
I concur with the discharge of the habeas corpus writs as to these four young people because, they no longer being confined, their petitions are moot. However, I believe that even where the circumstances are "most egregious" (a showing the state did not make in these cases), the use of constructive contempt to incarcerate young people under these circumstances directly contravenes the plain meaning of the statute, as set out in the text of that statute in unambiguous words, as revealed in its legislative history, and as recognized in the majority opinion.
Minn. Stat. § 260.173, subd. 3 (1978), as amended, specifically addresses the conduct which the lower court labeled "contempt of court." It provides:

If the child had been taken into custody and detained as one who is alleged to be delinquent by reason of:
* * * * * *
(c) Having been previously adjudicated delinquent, or conditionally released by the juvenile court without adjudication of delinquency, has violated his probation, parole, or other field supervision under which he had been placed as a result of behavior described in this subdivision; he may be placed only in a shelter care facility. (Emphasis supplied.)
The history of this legislation indicates that its purpose was to bar the confinement of even those young persons who are repeatedly wayward or habitually disobedient and who violate the terms of their court-ordered probation or confinement. To define disobedience to court orders during proceedings concerning an alleged status offense as a new act of delinquency of so different a nature from the original offense as to justify secure detention violates the policy of the federal Juvenile Justice Act and makes Minn. Stat. § 260.173, subd. 3(c) meaningless.
Such a procedure has been criticized by other courts and commentators. In State in Interest of M.S., 73 N.J. 238, 374 A.2d 445 (1977), the New Jersey Supreme Court vacated delinquency adjudications against four "status offenders" whose crimes consisted of leaving a shelter care facility without permission, an offense the trial court labeled criminal "escape." The court noted that:
[t]he unauthorized leaving of a shelter is symptomatic of the very problem for which shelter care is being provided. It would be incongruous to classify a juvenile as a delinquent for the same kind of conduct which under the Act constitutes him or her as being in need of supervision only. *709 73 N.J. at 244-45, 374 A.2d at 448. Similarly, the California Court in In re Ronald S., 69 Cal.App.3d 866, 138 Cal.Rptr. 387 (1977) criticized as "bootstrapping" the lower court's procedure by which a 13-year-old offender who ran away from a court-ordered shelter was charged with contempt, a criminal violation justifying secure detention. See also Matter of Mary D., 95 Cal. App.3d 34, 156 Cal.Rptr. 829 (1979). In North Carolina, where recent legislation forbids forcible confinement of juveniles charged with status offenses, one judge has cited these juveniles for contempt of court and sentenced them to solitary confinement in the local jail. This procedure has been criticized sharply and termed "unusual and highly controversial." B. Stuart, Solitary, Jail Terms for NC Youth, III Change II (Law Enforcement Assistant Administration publication) (1979) reprinted in Community Corrections Scene 6 (Washington County, Minnesota, Department of Community Corrections publication) (1980).
Minn. Stat. § 260.173, subd. 3(c) (1978) provides clearly that even those juveniles, such as those before us, who have violated the terms of their probation orders, are not to be physically confined. Courts should not, by their inherent contempt powers to enforce the terms of their orders, incarcerate a child for the very conduct which under the statute constitutes him or her as being in need of supervision only.
NOTES
[1]  A "shelter care facility" is defined by Minn. Stat. § 260.015, subd. 17 (1978) as "a physically unrestricting facility, such as a group home or a licensed facility for foster care, excluding a detention home."
[2]  In contrast to adults who, by escape "affront * * * the authority of the State," children who run away only harm their own well being. State in Interest of M.S., 73 N.J. 238, 374 A.2d 445 (1977).
[3]  1.1 Noncriminal misbehavior generally.

A juvenile's acts of misbehavior, ungovernability, or unruliness which do not violate the criminal law should not constitute a ground for asserting juvenile court jurisdiction over the juvenile committing them.
* * * * * *
5.2 Prohibition against placement in secure facility.
In no event should alternative residential placement for a juvenile in conflict with his or her family, who has violated no criminal law, be arranged in a secure detention facility or in a secure institution used for the detention or treatment of juveniles accused of crimes or adjudged delinquent.
