
406 A.2d 383 (1979)
In re B. M. L.
No. 179-79.
Supreme Court of Vermont.
September 10, 1979.
*384 James L. Morse, Defender Gen., Montpelier, and Steve Dunham, Public Defender, St. Albans, for petitioner.
David G. Miller, Franklin County State's Atty., and Marianne Lipscombe, Deputy State's Atty., St. Albans, for respondent.
Michael S. Gawne of Brown & Cahill, St. Albans, for the juvenile.
Before BARNEY, C. J., and DALEY, LARROW, BILLINGS and HILL, JJ.
BILLINGS, Justice.
This is an appeal from a denial of a petition for a writ of habeas corpus filed by the mother of B. M. L., a juvenile, requesting that he be released from detention pursuant to an order under Chapter 12 of Title 33, relating to judicial proceedings involving delinquent juveniles or juveniles in need of care or supervision, and returned to her custody.
The original juvenile proceeding commenced with a petition dated December 29, 1978, alleging that the juvenile, then two years of age, was in need of care and supervision, 33 V.S.A. §§ 644(a)(2), 645-646. The petition was filed in District Court, Unit No. 3, Franklin Circuit, hereinafter referred to as the juvenile court, 33 V.S.A. §§ 632(a)(8), 637. A hearing was held on January 11, 1979, which resulted in a temporary shelter care order, 33 V.S.A. § 642. On January 25, 1979, a hearing on the merits of the petition was held. At the close of the evidence, the juvenile court ordered that the original temporary shelter care order be continued. On February 25, 1979, the juvenile court signed an order continuing the shelter care of the juvenile under the terms and conditions of the temporary order of January 11 "until the Hearing on the Petition in this proceeding or until otherwise ordered by this Court." This order was supported only by the finding that "the child may leave the jurisdiction of this Court and or the custody of the child's parent." Full findings of fact and an order adjudicating the juvenile to be in need of care or supervision, 33 V.S.A. § 654(a), were not filed until May 18, 1979.
The juvenile's mother filed her petition for a writ of habeas corpus in superior court on April 6, 1979. The petition was denied on May 3, 1979, following hearing. The superior court recognized that the order of February 25, 1979, was legally insufficient for failure, as the court put it, "to set out fully the factual foundations for the order" as required by 33 V.S.A. § 654(a); In re J. M., 131 Vt. 604, 608, 313 A.2d 30, 32 (1973), but dismissed the petition on the ground that the proper avenue for the review of the order was by appeal to this Court.
The superior court's conclusion that it lacked jurisdiction to grant relief was erroneous. Both at the time of the habeas corpus petition and the time of the hearing thereon, the juvenile was being restrained without any final adjudication of the juvenile petition. The superior court's jurisdiction having been invoked by a proper complaint, it was under a duty to determine the lawfulness of the juvenile's restraint, and to grant relief if it determined that restraint to have been unlawful. 12 V.S.A. §§ 3951-3953.
The sufficiency of the order adjudicating the juvenile to be in need of care or supervision and the accompanying findings is not challenged on this appeal. The position of the juvenile's mother, appellant here, is that the juvenile court's delay in filing the findings and order, amounting to approximately ten weeks from the hearing on the merits of the juvenile petition at the time she brought her petition for habeas corpus, and to approximately fourteen weeks when her petition was heard, acted to deprive the court of authority to withhold her child.
33 V.S.A. § 654(a), which establishes the requirements for findings and an order following the hearing on the merits of a juvenile petition, does not impose any time limit upon the court for filing either the findings or the order, nor does any other section of the statute. We can not agree with appellee, the State of Vermont, however, that the juvenile court can continue to detain a juvenile indefinitely until such time as it files the required findings and order.
*385 As the State itself points out in its brief, our task is to effectuate the intent of the Legislature, Villeneuve v. Town of Underhill, 130 Vt. 446, 452, 296 A.2d 192, 196 (1972), which must be ascertained from the act as a whole, its effect, and its consequences, In re Preseault, 130 Vt. 343, 347, 292 A.2d 832, 835 (1972). An examination of the statute as a whole reveals a dominant concern on the part of the Legislature to provide for the speedy resolution of disputes involving a charge that a juvenile is delinquent or in need of care or supervision, especially when detention of the juvenile or removal from the custody of his parents or usual guardian or custodian pending disposition is involved. See, e. g., 33 V.S.A. § 647(a), which provides:
At the time of the filing of the petition,... the court shall fix a time for a hearing thereon, which, if the child is in detention or shelter care, shall not be later than fifteen days after the filing thereof. . ..
See also 33 V.S.A. § 654(b), which requires the court to hold a disposition hearing no later than thirty days after the findings mandated by 33 V.S.A. § 654(a).
We conclude that to permit the juvenile court to detain a juvenile for however long it takes it to produce an order that complies with 33 V.S.A. § 654(a) would frustrate the intent of the juvenile proceeding statute. We are reinforced in our conclusion by 12 V.S.A. § 5611, which provides: "A petition on any matter affecting the interests of a minor under chapter 12 of Title 33 . . shall be set down for hearing at the earliest possible time and shall take precedence over all matters except older matters of the same character." The evident legislative interest in the speedy resolution of these sensitive matters would be frustrated by permitting the juvenile court unlimited time to complete one step of the mandated process, upon which the timing of the remaining steps, the holding of a disposition hearing and the filing of an order of disposition, depends. See In re F. E. B., 133 Vt. 463, 464, 346 A.2d 191, 192 (1975).
Once the superior court determined that the February 25, 1979, order of the juvenile court was legally insufficient, it had a duty to determine if an unreasonable time had elapsed since the hearing on the merits of the petition and, if it so determined, to issue a writ of habeas corpus. The case must be remanded for this determination.
Reversed and remanded.
