
551 P.2d 948 (1976)
Charles W. ADAMS, Division of Corrections, Department of Health and Social Services of the State of Alaska, and Des Ashley, Director, McLaughlin Youth Center, Detention Unit, Anchorage, Alaska, Appellants,
v.
Wayne Anthony ROSS, Appellee,
No. 2458.
Supreme Court of Alaska.
July 2, 1976.
*949 Larry R. Weeks, Sp. Asst. Atty. Gen., Anchorage and Avrum M. Gross, Atty. Gen., Juneau, for appellants.
Wayne A. Ross, Anchorage, for appellee.
Before BOOCHEVER, C.J., and RABINOWITZ, CONNOR, ERWIN and BURKE, JJ.

OPINION
CONNOR, Justice.
S.L.M. was adjudicated a delinquent on February 22, 1974, and committed to the custody of the Department of Health and Welfare for an indefinite period, not to exceed his 19th birthday.[1] He was 16 years old at the time. He was released on probation from McLaughlin Youth Center in October of that year, with the knowledge of the court. S.L.M. was apprehended by Kenai police officers on January 10, 1975, for allegedly violating the law. A hearing was held five days later before Judge Hanson concerning the state's petition to modify or revoke S.L.M.'s probation because of the alleged violation. Judge Hanson dismissed the petition as unnecessary, reasoning that since S.L.M. had previously been committed to the department's custody, it was in the commissioner's discretion as to whether he should be returned to McLaughlin. He made no ruling on the merits, and disqualified himself from considering the facts because, based on knowledge outside the courtroom and on S.L.M.'s reputation in the community, he felt he "would lean over backwards to keep [S.L.M.] in an institution because I frankly feel he should be there...."
S.L.M.'s attorney, Wayne Ross, brought an action for habeas corpus before Judge Butcher in Anchorage to compel the state to release S.L.M. from McLaughlin.[2] The Anchorage court ordered S.L.M. released, since no hearing had been held within two days of his arrest. See Alaska Children's Rule 7(b). The court did not order a new hearing, since Judge Hanson had dismissed the state's petition, and hence no such petition was before the court. The court declined to rule on whether the state would be barred from further proceedings, but indicated that it would not. From the release of S.L.M., the state appeals.

JURISDICTION
Mr. Ross notes that the appellate jurisdiction of the supreme court is defined in AS 22.05.010. Subsection (a) provides in part:
"that the state shall have no right of appeal in criminal cases, except to test the sufficiency of the indictment or information"
or to appeal a sentence under AS 22.05.010(b). See Appellate Rule 5. Thus, he argues, the state is precluded from bringing this appeal.
*950 Ross' technical challenge is not well taken, however. This is an appeal from a discharge granted in a habeas corpus proceeding. See AS 12.75.230.[3] "It is apparently well settled that a habeas corpus proceeding is civil in nature," not criminal. In re Spracher, 17 Alaska 144, 145, 150 F. Supp. 555 (D.Alaska 1957).[4] Further, even for adults,[5] a probation revocation hearing is not a criminal proceeding in the sense that indictment, jury trial, or proof beyond a reasonable doubt are required, Trumbly v. State, 515 P.2d 707, 709 (Alaska 1973), Snyder v. State, 496 P.2d 62, 63 (Alaska 1973), although the revocation proceeding is necessarily an outgrowth of the initial criminal case.
Ross also asserts that since the state is not precluded from filing its delinquency petition, the habeas corpus release is not an appealable "final judgment",[6] and the state should only be allowed to file a petition for review rather than an appeal. It is true that because refiling is possible, further consideration of S.L.M.'s reincarceration at McLaughlin is not terminated before the appropriate court. Cf. P.H. v. State, 504 P.2d 837, 839 n. 1 (Alaska 1972). As to the habeas corpus proceeding, however, an order for release ends the litigation on the merits and leaves nothing for the court to do but execute that judgment. Greater Anchorage Area Borough v. City of Anchorage, 504 P.2d 1027, 1030 (Alaska 1972). That the state might file again seems irrelevant; this dispute, based on this filing, is terminated in the lower court. Thus it appears that an appealable final judgment has been entered.

The Discharge
As to the habeas corpus proceeding itself, the law as it has recently developed supports the propriety of S.L.M.'s discharge. AS 47.10.080(b)(1) authorizes commitment to the department "for an indeterminate period of time not to extend past a specified date or in any event past the day the minor becomes 19" unless a one-year extension is obtained. S.L.M. was committed for an indefinite period, but this does not necessarily mean that he could not have been released from custody before his 19th birthday, only that such custody should not extend beyond it. He was released, and placed upon probation.
Adult parolees and probationers must be allowed a hearing under the law *951 before they can be reincarcerated. Gagnon v. Scarpelli, 411 U.S. 778, 782, 93 S.Ct. 1756, 36 L.Ed.2d 656 (1973); Morrissey v. Brewer, 408 U.S. 471, 484, 92 S.Ct. 2593, 33 L.Ed.2d 484 (1972); Trumbly v. State, supra; see generally, A.B.A. Standards: Probation § 5.4 (1970). Other states have held that this right is also required for juveniles despite explicit language to the contrary in the terms of release or applicable statute. Keller v. State ex rel. Epperson, 265 So.2d 497 (Fla. 1972); People ex rel. Silbert v. Cohen, 29 N.Y.2d 12, 323 N.Y.S.2d 422, 271 N.E.2d 908 (1971). In Alaska, we have said:
"we believe that due process safeguards are necessary not only at the adjudicative hearing, but at any stage which may result in deprivation of the child's liberty." Doe v. State, 487 P.2d 47, 51 (Alaska 1971).
Accord, In re Gault, 387 U.S. 1, 16-18, 87 S.Ct. 1428, 18 L.Ed.2d 527 (1967). All parties before the court, including the Department of Health and Social Services, urge that a hearing be required. Finally, Children's Rule 7(b) provides that no child may be detained "prior to a first hearing of the case" unless a hearing is held within 48 hours after the child is taken into custody. Since the alleged probation violation appears to constitute a "case" separate from that involved in the original wrongdoing that produced the commitment and probation, Cf. Keller v. State ex rel. Epperson, supra at 498, this rule should be applied to S.L.M.
Since a hearing is required, the release of S.L.M. was proper under the circumstances. Children's Rule 7 provides that no detention may "be continued" unless a hearing has been held within 48 hours after the minor has been taken into custody. Since Judge Hanson had dismissed the state's petition, nothing was before the court to support a probation revocation hearing until the state had refiled. Therefore, Judge Butcher was required to release S.L.M.[7]
AFFIRMED.
NOTES
[1]  Unless the Department of Health and Welfare petitions for a continuance until his 20th birthday. See AS 47.10.080.
[2]  The action was brought in Ross' name to protect the identity of S.L.M.
[3]  AS 12.75.230 provides in part:

"A party to a proceeding by habeas corpus may appeal from the judgment of the court refusing to allow the writ or a final judgment therein in like manner and with like effect as in an action."
This language does not, of its own, negate the jurisdictional language of AS 22.05.010 (a), since it only permits appeals "in like manner ... as in an action."
[4]  "Though habeas corpus is technically `civil,' it is not automatically subject to all the rules governing ordinary civil actions." Schlanger v. Seamans, 401 U.S. 487, 490 n. 4, 91 S.Ct. 995, 997, 28 L.Ed.2d 251 (1971), reh. den., 402 U.S. 990, 91 S.Ct. 1671, 29 L.Ed.2d 156.
[5]  Ross argues that juvenile probation revocation proceedings are more criminal than civil in nature. He asserts that the fact that they are juvenile proceedings should not prevent them from being considered "criminal". In In re White, 445 P.2d 813, 815 (Alaska 1968), in deciding that a defendant has no right to peremptorily challenge a judge in juvenile proceedings, this court held that juvenile proceedings were neither civil nor criminal. However, that holding was overruled by In re G.K., 497 P.2d 914 (Alaska 1972); see also R.L.R. v. State, 487 P.2d 27, 33 n. 35 (Alaska 1971). Under federal law a juvenile proceeding is not a "criminal prosecution" for purposes of the federal Sixth Amendment. McKeiver v. Pennsylvania, 403 U.S. 528, 541, 553, 557, 91 S.Ct. 1976, 29 L.Ed.2d 647 (1971). It must be noted that Alaska Crim.R. 1 makes the Criminal Rules applicable to "all criminal proceedings," while it is clear that the procedure governing juvenile delinquency proceedings emanates from the Alaska Children's Rules. We need not decide whether an appropriate juvenile proceeding might be considered "criminal" for purposes of appellate jurisdiction under AS 22.05.010.
[6]  AS 12.75.230 provides for appeal of a habeas corpus proceeding from the "judgment of the court refusing to allow the writ or a final judgment therein... ."
[7]  Civil Rule 86(l) is inapplicable here. It is specifically limited by its terms to cases in which a parent, foster parent, or other relative of a child under sixteen attempts to obtain custody. S.L.M. was already sixteen when committed. Thus a show cause order was not required in place of a writ of habeas corpus by Rule 86.
