This is an appeal from a sentence imposed by the trial court pursuant to the Federal Youth Corrections Act (FYCA),1 18 U.S.C. §§ 5005-5026 (1976). Appellant contends that it was error for the trial judge to impose sentence under the FYCA because the repeal of the FYCA took effect before the sentencing hearing. The government argues that the ex post facto clause of the Constitution requires that the FYCA remain available as a sentencing option for all offenses committed before the date of its repeal. We hold that the provisions of the FYCA were not available on November 8, 1984, for the sentencing of appellant. In *456the circumstances of this case, therefore, we are compelled to vacate the sentence imposed by the trial court, and order the immediate release of appellant Melson.
The relevant facts are both few and undisputed. On June 8, 1984, appellant Mel-son, then twenty years of age, failed to appear in Superior Court as ordered in connection with a misdemeanor offense otherwise unrelated to the matter we consider here. This conduct violated the District of Columbia bail laws, D.C.Code § 23-1327 (1981); on September 27, 1984, the appellant pled guilty to a resulting charge of failure to appear. On October 12, 1984, Congress repealed the FYCA, and the repeal was immediately effective. Comprehensive Crime Control Act, Pub.L. No. 98-473 § 235(a)(1)(A), 98 Stat. 1837, 2031 (1984).2
The FYCA was thus in effect on the date of Melson’s offense as a possible sentencing option. Consequently, if appellant had been sentenced on the day of his offense, or at any time between the commission of his offense and the repeal of the Act, there could be no question about the legality of an FYCA sentence.
However, the sentencing proceeding in Melson’s case was held on November 8, 1984, approximately three weeks after the repeal. At the hearing he requested adult sentencing under D.C.Code § 23-1327(a)(2) (1981). The maximum period of incarceration under this section is one year. Over his strenuous objection he was sentenced to an indeterminate sentence under the FYCA, 18 U.S.C. § 5010(b).
The government argues that the sentence imposed on Melson was correct because an adult sentence would violate the constitutional ban against ex post facto legislation. The ex post facto clause of the Constitution prohibits Congress from passing ex post facto laws. U.S. CONST, art. I, § 9, cl. 3. An ex post facto law is one which is both retrospective, i.e., applying to events occurring before its enactment, and disadvantageous to the offender affected by it, i.e. more onerous than the law in effect on the date of the offense. Weaver v. Graham, 450 U.S. 24, 29, 30-31, 101 S.Ct. 960, 964, 965, 67 L.Ed.2d 17 (1981). See also Lindsey v. Washington, 301 U.S. 397, 401, 57 S.Ct. 797, 799, 81 L.Ed. 1182 (1937).
The government’s ex post facto argument is, however, irrelevant because the ex post facto prohibition is a protection for the individual against hostile government action. Kring v. Missouri, 107 U.S. 221, 229,2 S.Ct. 443, 450, 27 L.Ed. 506 (1883). We have here a defendant who expressly waived application of the ex post facto ban when he vigorously argued for adult sentencing.
Inquiries to the appropriate prison authorities have revealed that Melson is still incarcerated at the Youth Center in Lorton, Virginia. His confinement there is a result only of the FYCA sentence from which he has taken this appeal. This commitment is invalid: the express language of the Crime Control Act removed the statutory authority for FYCA commitments effective October 12, 1984; the defendant waived any right to constitutional protection. Melson should have been given an adult sentence under D.C.Code § 23-1327. The maximum term to which he could legally be sentenced was one year. D.C.Code § 23-1327(a)(2). This term has since expired. Clearly, Mel-son is now being held for a period in excess of that for which he could legally have been committed.
Therefore, the sentence imposed by the trial court is vacated. The Clerk of this Court is directed immediately to transmit *457the mandate together with a certified copy of this opinion to the trial court with directions to correct the record to reflect an adult sentence and to order Melson’s immediate release.
So ordered.
. The FYCA was designed to rehabilitate youthful offenders by providing an alternative sentencing program for those persons who were under the age of twenty-two at the time of their convictions. Dorszynski v. United States, 418 U.S. 424, 433, 94 S.Ct. 3042, 3048, 41 L.Ed.2d 855 (1974); 18 U.S.C. § 5006(d) (1976). See also H.R.Rep. No. 2979, 81st Cong.2d Sess., reprinted in 1950 U.S.Code Cong.Serv. 3983, 3985. Under its provisions, the court may sentence the youth offender to an indeterminate sentence; this option may result in confinement for a maximum of four years plus two years of conditional release. 18 U.S.C. §§ 5010(b), 5017(c). However, the FYCA creates an enforceable right to special treatment for those sentenced under its provisions. United States v. Donetson, 224 U.S.App.D.C. 389, 394, 695 F.2d 583, 588 (1982).
. The Crime Control Act repealed the commitment and sentencing provisions of the FYCA effective immediately. The provisions of the FYCA concerning release, revocation of parole, commission orders, supervision and apprehension of released offenders remain in effect for five years after the effective date of the Crime Control Act, but only as to persons sentenced before the date of the repeal of the FYCA. Comprehensive Crime Control Act, Pub.L. No. 98-473, § 235(b)(1)(E), 98 Stat. 2032 (1984).