This is an appeal from an order extending the period of time during which Appellant shall be in the custody of the Division of Youth Services (“DYS”). The statute authorizing the extension took effect after Appellant was originally placed with DYS. Appellant maintains the statute, as applied to him, violated his constitutional protection against ex post facto laws.
The pertinent facts are undisputed.
Appellant was born February 15,1979.
On April 25, 1995, the Juvenile Division of the Circuit Court of New Madrid County (henceforth referred to as “the juvenile court,” see § 211.021(3)1) found it had jurisdiction over Appellant — inferably pursuant to § 211.031.1(3) — in that Appellant had violated § 566.067.2 The juvenile court committed Appellant to the custody of DYS.
At that time, § 219.021.1 read, in pertinent part:
“All children committed to the custody of the division shall be committed for an indeterminate period of time except that the division shall not keep any child beyond his eighteenth birth date.”
At the same time, § 211.041 read, in pertinent part:
“When jurisdiction over the person of a child has been acquired by the juvenile court under the provisions of this chapter in proceedings coming within the applicable provisions of section 211.031, the jurisdiction of the child may be retained ... until he has attained the age of twenty-one years, except in cases where he is committed to and received by the division of youth services, unless jurisdiction has been returned to the committing court by provisions of chapter 219, RSMo, through requests of the court to the division of youth services.... ”
DYS placed Appellant in the W.E. Sears Youth Center (“Sears”) and began a treatment regimen including individual and group sexual offender therapy, individual psychological counseling, sex education, individual and group substance abuse counseling, family therapy and a general educational program.
On December 6,1995, Appellant was “medically furloughed” from Sears by DYS to enter the Marillac Center in Kansas City (“Marillac”) for specialized treatment services for sex offenders. Appellant also received general educational services in residence at Marillac in preparation for a GED examination.
On August 27, 1996, Appellant was returned to Sears because Marillac had “exhausted all ... available resources” and recommended a “more structured environment as well as continued individual therapy.” At Sears, a new treatment plan was implemented including workshops on conflict resolution, communications, anger management, victim empathy and self esteem, together with individual and group counseling, drug and alcohol education, treatment furloughs and family therapy.
On January 27,1997, less than three weeks before Appellant would reach age eighteen, DYS filed a petition asking the juvenile court “to extend the commitment period” of Appellant to age twenty-one or such earlier time that Appellant “demonstrated the capability of behaving in a socially responsible man*676ner.” Attached to DYS’s petition was a report to the court from a sexual offender counselor who had counseled Appellant at Sears. The report stated, inter alia:
“I fully believe that [Appellant] poses a great danger to small children by means of sexual molestation. I also believe that others could potentially be in danger if [he] were to be released from this program at this time.”
DYS’s petition averred the juvenile court was authorized to extend Appellant’s commitment to DYS past Appellant’s eighteenth birthday by reason of a 1996 amendment to § 219.021. The amendment, which took effect after the date the juvenile court originally committed Appellant to the custody of DYS, appears in Laws of Missouri 1995, H.B. 174, et al., pp. 544-70. The amendment changed § 219.021.1 so that it read, in pertinent part:
“The division shall not keep any child beyond his eighteenth birth date, except upon petition and a showing of just cause in which case the division may maintain custody until the child’s twenty-first birth date. ” (Emphasis added.)
On February 11, 1997, the juvenile court conducted an evidentiary hearing on DYS’s petition. The deputy director at Sears, a “certified sexual offender counselor,” testified that if the court extended Appellant’s commitment, Sears was ready to implement “the most intense programming that we have ever done at Sears ... or anywhere else.” The program would include church attendance outside Sears with a “tracker,” counseling about the conflict between religious beliefs and sexual offenses, intense individual sexual offender counseling, individual and group drug and alcohol counseling, arrangements for continuing Appellant in Alcoholics Anonymous when he is released for home placement, a tutoring program where Appellant can earn minimum wage by assisting in tutoring another juvenile, vocational education to train Appellant as a mechanic, workshops on social skills and conflict management, and family therapy. The witness revealed that Appellant “did in fact pass his G.E.D.” According to the witness, Appellant “has acted more willing towards this plan than any that I have seen.”
Other witnesses testified, but it is unnecessary to synopsize their testimony.
At the conclusion of the evidence, the juvenile court found Appellant was not ready to be returned into the community and there were still services DYS could provide him. The court further found it would be in Appellant’s best interest to receive those services, and that if Appellant were released by DYS, it would be only “a short period of time” before Appellant was “facing criminal charges as an adult.” The court emphasized it was not ordering Appellant to remain in DYS custody until age twenty-one, and that the court would review Appellant’s progress on a periodic basis. The court granted DYS’s petition and ordered Appellant to remain in the custody of DYS until reaching age twenty-one or until further order of the court.
The first of Appellant’s two points relied on avers the juvenile court erred in extending Appellant’s commitment to DYS’s custody beyond the date he reached age eighteen. Appellant points out that when he was originally committed, § 219.021.1 forbade DYS from keeping him after he reached that age. Appellant argues that the juvenile court’s use of the 1995 amendment to § 219.021.1 to extend Appellant’s commitment beyond age eighteen was an “ex post facto application of the law” in that it altered his “substantial personal rights by causing a loss of personal freedom.”
Appellant relies on Art. I, § 10, Constitution of the United States, which reads, in pertinent part:
“No state shall ... pass any ... ex post facto law....”
Appellant also relies on Art. I, § 13, Constitution of Missouri (1945), which reads, in pertinent part:
“That no ex post facto law ... can be enacted.”
Appellant directs us to State v. Lawhorn, 762 S.W.2d 820 (Mo. banc 1988). There, the accused committed a felony. Id. at 824. At the time he committed it, a felon was eligible for parole after serving one-third of his sentence or twelve months, whichever was short*677er. Id. However, by the time the accused was sentenced, the law had been amended so that he, as a prior offender, had to serve forty percent of his sentence before becoming eligible for parole. Id.
The Supreme Court of Missouri held that in order to fall within the ex post facto prohibition, a law must apply to events occurring before its enactment and must disadvantage the offender affected by it. Id. The court ruled the accused was disadvantaged by being sentenced under the amended statute, hence the trial judge should have imposed sentence under the statute in effect when the felony was committed. Id. at 826.
A like result was reached in State v. Gentile, 781 S.W.2d 169,170-71[1] (Mo.App. E.D.1989), also cited by Appellant.
DYS concedes that if the juvenile court, in utilizing the 1995 amendment to § 219.021.1 to extend Appellant’s period of commitment to DYS, had subjected Appellant to increased punishment for a criminal act, the court’s application of the 1995 amendment would have been an impermissible ex post facto application. DYS acknowledges State ex rel. Cavallaro v. Groose, 908 S.W.2d 133, 136[8] (Mo. banc 1995), which explains:
“The ex post facto clause is aimed at laws that are retroactive and that either alter the definition of crimes or increase the punishment for criminal acts already committed.”
However, emphasizes DYS, the instant case is not one in which Appellant was convicted of, and sentenced for, a crime. DYS reminds us that juvenile proceedings “are in the nature of civil proceedings,” In the Interest of J. M., 847 S.W.2d 911, 913[1] (Mo.App. E.D.1993), and that the ex post facto clause in Mo. Const. Art. I, § 13 applies to criminal legislation only; it has no application to civil proceedings. State v. Thomaston, 726 S.W.2d 448, 459[3] (Mo.App. W.D.1987).
Schall v. Martin, 467 U.S. 253, 104 S.Ct. 2403, 81 L.Ed.2d 207 (1984), cited by DYS, addressed the constitutionality of a New York statute authorizing pretrial detention of a juvenile if the court found a serious risk that the juvenile, prior to the hearing on the merits, may commit an act which if committed by an adult would constitute a crime. 467 U.S. at 255-56, 104 S.Ct. at 2405.
Finding the statute constitutional, the court declared the state had a parens patriae interest in preserving and promoting the welfare of the juvenile. 467 U.S. at 262-64, 104 S.Ct. at 2409. The court explained that preventive detention was purportedly designed to protect the juvenile and society from the potential consequences of his criminal acts, and that when making the detention decision, the judge was specifically directed to consider the needs and best interests of the juvenile as well as the need for the protection of the community. 467 U.S. at 262-65, 104 S.Ct. at 2409-10.
Recognizing the juvenile had an interest in freedom from institutional restraints, the court nonetheless noted that juveniles, unlike adults, are always in some form of custody and are not assumed to have the capacity to take care of themselves. 467 U.S. at 264-65, 104 S.Ct. at 2410. They are assumed to be subject to the control of their parents, and if parental control falters, the state must play its part as parens patriae. Id. at [3]. Consequently, the juvenile’s liberty interest may, in appropriate circumstances, be subordinated to the state’s parens patriae interest in preserving and promoting the welfare of the juvenile. Id. at [4],
The court pointed out that during pretrial detention, the juvenile received schooling and counseling, and had access to recreational facilities. 467 U.S. at 270-71, 104 S.Ct. at 2413. The court found the detention was non-punitive in nature. 467 U.S. at 273-75, 104 S.Ct. at 2415.
Allen v. Illinois, 478 U.S. 364, 106 S.Ct. 2988, 92 L.Ed.2d 296 (1986), also cited by DYS, involved an Illinois statute authorizing involuntary commitment of adults adjudicated as sexually dangerous persons. 478 U.S. at 365-66, 106 S.Ct. at 2990. The statute provided for placement of such persons in facilities for care and treatment designed to effect recovery. 478 U.S. at 368-70,, 106 S.Ct. at 2992. The statute further provided that such persons would be discharged if found to be no longer dangerous. Id.
*678The issue in Allen was whether the statements of an individual alleged to be a sexually dangerous person, made to psychiatrists during a court-ordered examination under the statute, were admissible at the hearing to determine whether the individual was a sexually dangerous person. 478 U.S. at 364-68, 106 S.Ct. at 2990-91.
The court explained that the self-incrimination clause of the Fifth Amendment to the Constitution of the United States barred the use of such statements if the Illinois procedure was a criminal proceeding. 478 U.S. at 366-70, 106 S.Ct. at 2991-92. Observing that the purpose of the Illinois statute was to provide treatment and to ensure the release of persons when they became no longer dangerous, the court held the statute did not promote either of the traditional aims of punishment — retribution and deterrence. Id. Accordingly, the court held the proceeding was not “criminal” within the meaning of the Fifth Amendment, consequently the individual’s statements to the psychiatrists were admissible. 478 U.S. at 374-76, 106 S.Ct. at 2996.
In the instant case, the record compellingly demonstrates that the goal of DYS throughout the entire period of Appellant’s commitment has been to educate him, train him to be self-sufficient, condition him to avoid the scourge of drug and alcohol abuse, prepare him (and his family) for his return, and alter his aberrant behavior toward children.
That has likewise been the goal of the juvenile court. Inasmuch as Appellant was fifteen when he violated § 566.067 (the conduct on which the juvenile court based its jurisdiction), the court could have dismissed the juvenile petition and transferred Appellant to the circuit court for prosecution under the general law. § 211.071.1. The purpose of such a transfer is to protect the public in those cases where rehabilitation of the juvenile appears impossible. State ex rel. Arbeiter v. Reagan, 427 S.W.2d 371, 377[4] (Mo. banc 1968). Instead, the juvenile court committed Appellant to DYS, obviously making rehabilitation, not incarceration, the objective.
Placing Appellant with DYS for that purpose was an appropriate exercise of the state’s parens patriae authority, designed to benefit both Appellant and society by exorcising Appellant’s predilection for sexual contact with children and enabling him to become a self-sufficient adult.
This court recognizes that as a juvenile advances toward adulthood, the state’s par-ens patriae interest diminishes. This court does not imply the state’s parens patriae interest alone enables the state to keep Appellant with DYS until age twenty-one. The relevance of the parens patriae discussion in this opinion is that it demonstrates Appellant’s commitment to DYS at age sixteen for education, treatment and rehabilitation was civil, not criminal, in nature. The juvenile court’s decision to keep Appellant with DYS after age eighteen for the same purposes was analogous to the action of the Illinois authorities in Allen, 478 U.S. 364, 106 S.Ct. 2988, 92 L.Ed.2d 296, where the involuntary commitment of a sexually dangerous person for treatment and rehabilitation was held not to be a criminal proceeding.
This court holds Appellant’s commitment to DYS was civil, not criminal, in nature, hence the juvenile court’s use of the 1995 amendment to § 219.021.1 to extend the period of Appellant’s commitment did not constitute an ex post facto application of the law. Appellant’s first point is denied.
Appellant’s second point is:
“The trial court erred- in overruling Appellant’s motion to dismiss based upon lack of jurisdiction because the jurisdiction of the juvenile court ceases at age 18 in that the court’s order extends past Appellant’s 18th birthday and section 211.031 RSMO. specifically sets forth the juvenile court’s exclusive jurisdiction as persons age 17 and below.”
As this court comprehends the point, Appellant’s premise is: (A) the juvenile court originally acquired jurisdiction over him under § 211.031.1(3) because he, while under seventeen years of age, violated a state law, and (B) the version of § 219.021.1 in force when the juvenile court committed Appellant to the custody of DYS provided that DYS could not keep him after he reached age eighteen. Therefore, says Appellant:
*679“The essential issue is whether or not the [1995] amendment to Section 219.021.1 ... serves to increase the [juvenile court’s] jurisdiction as set forth in Section 211.031.1 ... by adding a simple clause that requires a showing of ‘just cause.’”
Appellant ignores § 211.041, quoted in pertinent part earlier in this opinion, which was in force when the juvenile court took jurisdiction of him. That statute permits a juvenile court to retain jurisdiction over a juvenile until age twenty-one, except where the court commits the juvenile to DYS. Even in the latter situation, the court can exercise jurisdiction over the juvenile past age eighteen if the court regains jurisdiction from DYS per § 219.081. State v. Tate, 637 S.W.2d 67, 71-72 (Mo.App. E.D.1982).3
The apparent purpose of the 1995 amendment to § 219.021.1 was to allow DYS to continue providing treatment and services to a juvenile past age eighteen if a juvenile court found just cause for doing so. Inasmuch as § 211.041 already allowed a juvenile court to retain jurisdiction over a juvenile until age twenty-one (except where the juvenile was committed to DYS), the 1995 amendment to § 219.021.1 simply gave the juvenile court another option for treatment and rehabilitation of juveniles past age eighteen.
A legislative intent to increase a juvenile court’s flexibility in crafting an appropriate disposition in a juvenile case is evidenced by another statute enacted in 1995: § 211.073. It authorizes a juvenile court, when an offender under seventeen has (a) been transferred to the circuit court for prosecution under the general law, and (b) been convicted, to “invoke dual jurisdiction of both the criminal and juvenile codes.” An extended discussion of this innovative statute is unnecessary in resolving the present appeal. It is sufficient to note that the statute grants the court options it did not formerly have.
If this court has correctly divined the import of Appellant’s second point, the point is meritless.
The juvenile court’s order of February 11, 1997, is affirmed.
GARRISON, P.J., and PREWITT, J., concur.. References to statutes in this opinion are to RSMo 1994 unless otherwise indicated.
. Section 566.067 makes it a felony to subject a person less than twelve years of age to sexual contact.
. A holding in Tate on an unrelated point was overruled by State v. Carson, 941 S.W.2d 518, 520, 524 (Mo. banc 1997).