delivered the opinion of the Court.
At the time of the facts alleged in the information filed against the appellant Andújar Batis, that is, on September 10, 1955, the latter was over 18 years of age but had not yet reached his majority. It appears from the record that on that date Andújar was subject to the authority of the Juvenile Section of the Superior Court. That is, he was covered by the provisions of Act No. 37 of March 11, 1915, as amended. 34 L.P.R.A. § § 1941-1975.1 The new Act on delinquent children — Act No. 97 of June 23, 1955 (Sess. Laws, p. 504) —went into effect 90 days after its approval, that is, on September 21, 1955. However, based on § 3 of *794the said Act No. 97 of June 23, 1955 (34 L.P.R.A. 1957 Cum. Suppl., §2003), the Juvenile Section waived its authority over the minor defendant and ordered a change of venue for the latter to be prosecuted as if he were an adult.2 It thus appears from the record and it is so admitted by the appellee as well as by the appellant. After a trial before the Superior Court, Ponce Part, Andújar was found guilty of the ■crime of burglary in the first degree and sentenced to serve ■from one to six years’ imprisonment in the penitentiary at (hard labor. We believe that the judgment rendered must be .reversed.
In effect, Andújar could not be prosecuted under terms and conditions more onerous than those imposed by the .Act in force at the time the facts alleged in the information were committed. It is admitted that, pursuant to said Act, the Juvenile Section could not waive its authority over the minor or order a change of venue for the case to be dealt with as if Andújar were an adult. And said Act also provided, among other things, that: (1) “All punishments and penalties imposed by law . . . shall be discretionally imposed by the court, and the execution of any sentence may be remitted or suspended by the said court. The confinement of a child ... in a jail or penitentiary shall not be permitted.” (34 L.P.R.A. § 1963) ; (2) “Any order or judgment entered by the court against a child . . . shall not in any civil, criminal, or other case, or proceedings whatever in court, be legal or proper evidence against such child for any purpose what*795soever, excepting in subsequent cases against the same child under this Act.” (34 L.P.R.A. § 1964); and (3) “The proceedings and judgments determined herein shall only imply the exercise of an eminent patria potestas by The People of Puerto Rico over children, against whom no criminal precedent shall be established.” (34 L.P.R.A. § 1973.) Defendants prosecuted as adults did not and do not have today the right to such benefits and liberalities. Thus, for example: the Juvenile Section would have had discretion to sentence the accused to a lesser punishment than the minimum of one year fixed by the Penal Code for the crime of burglary in the first degree. See 33 L.P.R.A. § 1593. The prosecuting attorney accepts these conclusions upon acquiescing to the reversal.
Consequently, we believe that the provisions in the aforementioned § 3 of Act No. 97 of 1955, are not applicable to the case at bar. Otherwise, said provision would be ex post facto, for it would operate in detriment of the accused and would prejudicially alter his situation in relation to the alleged crime or its consequences. Art. II, § 12 of the Constitution of the Commonwealth of Puerto Rico (1 L.P.R.A» p. 182). See Fernández v. Rivera, Warden, 70 P.R.R. 859 (1950); Emanuelli v. District Court, 74 P.R.R. 506 (1953); Lindsey v. Washington, 301 U.S. 397 (1937); Thompson v. Utah, 170 U.S. 343 (1898).3 A penal statute should not be given retroactive construction if such construction would make it unconstitutional within the prohibition against ex post facto legislation. See Crawford, The Construction of *796Statute's, § 281 (1940) ; 2 Sutherland, Statutes and Statutory Construction, § § 2201-2204, 2301-2310 (1943). Thus, it is obvious that the accused could not be prosecuted or sentenced as an adult, in violation of the terms and conditions of the Act; on delinquent children in force at the time of the alleged crime.
For the above reasons, in an ordinary case the judgment appealed from should be reversed and a new trial ordered before the juvenile court. However, since he has remained in the penitentiary for the last two and one-half years, Andújar has now attained 21 years of age. And at .a trial he would have a right to the application of all the provisions of Act No. 97 of 1955, not disfavorable to him, as provided in § 15, to the effect that: “Act No. 37, of March 11, 1915, as amended, is hereby repealed, and the provisions of this act shall be applicable to all cases pending or in course of action under the said act hereby repealed, as well as to all cases pending or in course of action involving a child.” (Sess. Laws, p. 518.)
Now, the power or authority of the “court” over a minor depends on the date on which the offense was committed and not that on which the proceedings commenced or the court acquired jurisdiction over the delinquent child. It was so declared by the interpretative jurisprudence of Act No. 37 of 1915, as amended. See Irizarry v. District Court, 72 P.R.R. 180, 184-186 (1951). Cf. 123 A.L.R. 446-454; 48 A.L.R. 2d 663, 695-700; 31 Am. Jur., Juvenile Courts, § 40; State ex rel. Heth v. Moloney, 186 N.E. 362 (Ohio, 1933); Miller v. Superintendent of Indiana Boys’ School, 198 N.E. 66 (Ind. 1935); Ex parte Lewis, 188 P.2d 367 (Okla. 1947); The Young Offender: Jurisdiction, 17 Brooklyn L. Rev. 216, 224-225 (1951). And the new 1955 Act expressly adopted that criterion upon defining the term “child” as follows: •“ . . . shall mean a person under 18 years of age or a person who having reached 18 years of age is held to answer for an actual or attempted violation of a commonwealth law or *797a municipal ordinance committed by said person before his having attained the age of 18 years.” (Italics ours.) 34 L.P.R.A., 1957 Cum. Suppl., § 2001.
Since pursuant to the sections of the former Act the juvenile court could impose a “sentence” or “punishment” of imprisonment for a fixed term, our jurisprudence had also laid down the rule that a delinquent child could be prosecuted even after he had attained his majority. Ex parte Castro, 54 P.R.R. 733 (1939) and Irizarry v. District Court, 72 P.R.R. 180 (1951). But today the situation is different. In accordance with the fundamental purpose of rehabilitating and readjusting the minor by means of suitable treatment, the Juvenile Section can only enter “orders” on the custody, detention and expedition of medical, psychiatric and psychological services to the child.4 Besides, the period of detention or custody is always of indeterminate nature: that is, until the minor reaches 21 years of age. Of course, at any time within that period the court can modify its disposition to place the child. “ ... on probation in the home of his parents or of any other suitable person, under the custody or supervision of the former or of the latter.” 34 L.P.R.A., 1957 Cum. Suppl. § 2010.
Ordinarily the court has a period of at least three years for the treatment of rehabilitation and readjustment. That period is often longer. But there is no doubt that the court’s authority over the child ceases when it reaches 21 years of age. That is, in conformity with the Act in force, the minor *798can be detained under the custody of the Secretary of Health or a private institution until he is rehabilitated or readjusted, but never beyond the date when he reaches 21 years. This is clear primarily from the careful enumeration made by § 10 of the Act in providing what orders can be entered by the Juvenile Section in cases concerning children.5 Secondly, the Act in force clearly establishes that: “The Court shall retain its authority over any child covered by the provisions of this Act until he attains 21 years of age. . . (Italics ours.) 34 L.P.R.A. 1957 Cum. Suppl. § 2003. And the rule by which the statutes on juvenile delinquency generally abide, as to the term or period of detention, is that the “delinquent” child shall be placed under suitable custody during his minority for as long as he needs treatment for his rehabilitation or readjustment. Commitment always terminates by operation of law when the minor reaches his majority. Ex parte Nac*799carat, 41 S.W.2d 176 (Mo. 1931), Note in 76 A.L.R. 657-666; The Young Offender: Jurisdiction, 17 Brooklyn L. Rev. 216, 224-225 ( 1951) ; 31 Am. Jur., Juvenile Courts, § §47-49; Rubin, Protecting the Child in the Juvenile Court, 43 J. Grim. L., C. and P. S. 425, 437-439 (1952) ; Sharp, Jails or Detention Homes for Children?, in Youth & Crime 182-189 (Cohen ed. 1957) ; Rubin, Crime and Juvenile Delinquency 109 (1958).6
Thus, under the Act in force, the juvenile court has no power or authority to prosecute Andújar after the latter attained his majority. And undoubtedly, the detention or custody of any “child” by virtue of an order of the juvenile court terminates by operation of law at 21 years of age. Perhaps it- would be convenient to make a revision of our legislation to determine: (1) what measures should be taken when a child commits a felony but the juvenile court does not acquire jurisdiction over it before it reaches its “majority” (that is, 21 years) ; and (2) if in cases of children that suffer from mental illness the detention should be prolonged ' until they can be restored to normal life safely. Thus, for example, in Connecticut the statute provides that: “Commitments by the juvenile court shall be for an indeterminate time but shall terminate when the child reaches the age of twenty-one except in the case of mental defectives or defective delinquents.” (Gen. Stat. of Conn., Rev. 1949, §2814.) See Rubin, Crime and Juvenile Delinquency 69-72, 89-113 (1958).7
*800The judgment appealed from will be reversed and the case remanded to the lower court with instructions to dismiss the case.
Mr. Chief Justice Negrón Fernández dissented. Mr. Justice Serrano Geyls did not participate herein.Section 8 of Act No. 37 of March 11, 1915, as amended, provided in its pertinent part: “ . . . the word ‘child’ or .‘children’ shall . . . unless specifically stated otherwise, include any child within Porto Rico who- is under 16 years of age, or having once .come within the jurisdiction. of the juvenile, court by the provisions of this Act has not attained its *794majority . . .” 34 L.P.R.A. § 1948. Before reaching the age of 16 years, the appellant had remained subject to the jurisdiction of the juvenile court and the provisions contained in said Act concerning delinquent children. See Irizarry v. District Court, 72 P.R.R. 180 (1951) and Torres v. Saldaña, 59 P.R.R. 633 (1941).
Said section provides the following: “The Court shall retain its authority over any child covered by the provisions of this act until he .attains 21 years of age, unless said Court shall, upon order to that effect, waive its authority over the minor after reaching 16 years and before attaining 21 years of age; provided, however, that a minor who, having reached 18 years of age, commits another violation of law while under the supervision of the Court, shall be prosecuted as an adult.”
See, also, Calder v. Bull, 3 Dall. 386, 1 L. Ed. 648 (1798); Kring v. Missouri, 107 U.S. 221 (1883) and Ex parte Medley, 134 U.S. 160, (1890). Cf. Dowling and Edwards, American Constitutional Law 558-562 (1954). As expressed by the Supreme Court of the United States in the Lindsay case, supra, the ex post facto clause looks to the standard of punishment prescribed by a statute, rather than to the sentence imposed. The Constitution forbids the application of any new punitive measure to a crime already consummated, to the detriment of the accused. It is for this reason that an increase in the possible penalty is ex post facto, regardless of the length of the sentence actually imposed.
As our Legislative Assembly stated in the statement of motives of Act No. 97 of 1955, the problem of maladjusted or neglected children is ■essentially one of social prophylaxis but it always calls for some legal device which will enable the judicial authority to take cognizance of cases concerning the care and treatment of said children. Concerning the juridical and social problems raised by the so-called juvenile delinquency, see Tappan, Juvenile Delinquency (1949); Glueck, Unraveling Juvenile Delinquency (1950); Glueck, Delinquency in the Making: Paths to Prevention (1952); (Cohen ed. 1957), Youth and Crime; Virtue, Basie Structure for Children’s Services (1958); Cahn, A Court for Children (1953) ; Grunhut, Juvenile Offenders Before the Courts (1956) ; (Bell ed. 1957), Guides for Juvenile Court Judges.
“If the Judge shall find that the condition or behavior of the child brings him under the provisions of section 2 of this act, he may entel-an order:
1. Directing that the child be, for the sole purposes of diagnosis, submitted to examination by a physician, psychiatrist or psychologist and to that effect he may place him in a hospital or suitable institution; provided, that in order to expedite the medical, psychiatric and psychological services to the minor, as herein provided, he may obtain the services of any physician, psychiatrist or psychologist legally authorized to practice in Puerto Rico and order payment of their fees according to the standards set by the Office of Court Administration; and provided, further, that in the cases covered by subsections 1, 4 and 5 of this section, the Court may, after investigating the economic condition of the father, the mother, or the caretaker of the minor, impose on any of them the obligation to contribute a reasonable sum toward defraying in whole or in part the expenses incurred in the treatment of the minor, and unjustified failure on the part of the persons concerned to comply with the order of the Court in this respect, shall constitute contempt; or
2. Setting aside the petition for commitment to an institution; or
3. Placing the child on probation in the home of his parents or of any other suitable person, under the custody or supervision of the former or of the latter.
4. Placing the child under the custody of the Secretary of Health for commitment to an institution suitable for the treatment of children or for placement in a foster home; or
5. Placing the child under the custody of a suitable private organization or institution.” 34 L.P.R.A., Cum. Suppl. § 2010.
The Standard Juvenile Court Act, published by the National Probation and Parole Association in 1949, provides in its 5 9 that the authority over a minor terminates when the latter attains 21 years of age. See Suss-mann, Law of Juvenile Delinquency 80-94, App. II (1950). Our Legislature apparently took said Standard Juvenile Court Act as model upon adopting Act No. 97 of 1955. See also MacCormick, Existing Provisions for the Correction of Youthful Offenders, 9 Law & Contemp. Prob. 588 (1942) ; Mimms, Indeterminate Control of Offenders Under the Youth Correction Authority Act: Constitutional Issues 635-649, 9 ibid. (1942).
As to the problem of insanity in criminal adults, see People v. Alsina, 79 P.R.R. 44, 60-61 (1956); Weihofen, Mental Disorder as a Criminal *800Defense 365-375 (1954). Compare also: Guttmacher and Weihofen, Psychiatry and the Law (1952) ; Neustatter, Psychological Disorder and Crime (1953); Winfield, Mental Abnormality and Crime (1949); Zilboorg, The Psychology of the Criminal Act and Punishment 1954; Hoch and Zubin (eds), Psyehistry and the Law (1955); Weihofen, The Urge to Punish (1956).