OPINION OF THE COURT
Casey, J.Relying upon the general rule that a juvenile cannot be prosecuted for the crime of bail jumping (see, Matter of Natasha C, 80 NY2d 678; Matter of John D., 186 AD2d 564), defendant argues that his bail jumping conviction should be reversed because he was a juvenile when he was admitted to bail in the underlying criminal action. The argument is rejected. Defendant was 16 years old when he failed to appear as directed while on bail, and County Court clearly had jurisdiction to admit defendant to bail in the underlying action even though defendant was then less than 16 years of age.
Defendant was arrested and charged with possession of cocaine in July 1991. He used the name Eddie Estalo and represented himself to be 19 years old. After he was indicted under the name of Eddie Estalo, defendant entered a plea of guilty to one count of the indictment in satisfaction of all counts. Upon defendant’s request, County Court admitted defendant to bail pending the imposition of sentence.
Defendant failed to appear on the date scheduled for sentencing and he was subsequently indicted on a charge of bail jumping in the first degree. When defendant appeared in court and explained that he did not turn 16 until two days before the date scheduled for sentencing on the drug charge, County Court vacated defendant’s plea to the drug charge and dismissed the indictment upon which the plea had been based. Defendant then entered a plea of guilty to the bail jumping charge, and he was sentenced as an adult to 1 to 3 years in prison.
Our analysis begins by recognizing that Matter of Natasha C. (supra) involved juvenile delinquency proceedings commenced and prosecuted in Family Court, pursuant to Family Court Act article 3, in which "[b]ail is not an option” (supra, at 681, n). In this case, however, the underlying proceeding was commenced and prosecuted as a criminal action, pursuant to the CPL, in which bail clearly is an option (see, CPL art 500 et seq.), and defendant was in fact admitted to bail in that action. Defendant’s appeal is apparently based upon the claim that County Court lacked jurisdiction to admit defendant to bail because he was less than 16 years old at the time. The claim is patently meritless.
It is clear that defendant’s age did not in and of itself affect County Court’s jurisdiction over defendant and the underlying *111drug-related class B felony charge (see, People v Parra, 191 AD2d 465; People v Brown, 190 AD2d 742). Infancy is a defense (Penal Law § 30.00) which, when placed in issue at trial, the People must disprove beyond a reasonable doubt (Penal Law § 25.00; see, People v Parra, supra). The infancy issue can be raised at any time and the CPL expressly provides the procedures for dealing with the issue at various stages of the criminal proceeding (see, CPL 180.75 [during arraignment upon a felony complaint], 190.71 [during proceeding before Grand Jury], 210.43 [after indictment], 220.10 [5] [g] [plea]; 310.85 [verdict upon trial], 330.25 [after a verdict]). CPL article 725 contains the procedure for removal of proceedings against a juvenile offender from criminal court to Family Court. Pursuant to CPL 725.10 (2), the criminal action terminates and the criminal court’s jurisdiction ceases upon the filing of an order of removal.
An analysis of the relevant substantive and procedural statutory provisions reveals the absence of any fundamental flaw in the underlying criminal proceeding wherein defendant was charged with the drug-related felony and admitted to bail.* It is clear from the statutory scheme that a juvenile can be charged with a felony (see, e.g., CPL 180.75), and the criminal proceeding remains viable even though he cannot ultimately be held criminally responsible for the conduct upon which the charge is based. Depending upon the stage of the criminal proceeding at which the issue is raised certain statutorily prescribed procedures must be followed, which can result in transfer of the matter to Family Court. Until the transfer order is filed, however, the criminal proceeding remains viable and the criminal court retains jurisdiction of the matter regardless of whether the defendant can ultimately be held criminally responsible (see, CPL 725.10 [2]).
At no time prior to sentencing in the underlying criminal proceeding did defendant raise the defense of infancy, and there is no claim that County Court or the prosecutor or even defense counsel knew or should have known that defendant was more than three years younger than the 19 years of age he claimed to be. As the matter was never transferred to Family Court, the criminal proceeding did not terminate and County Court never lost jurisdiction (see, CPL 725.10 [2]). It is clear, therefore, that when defendant failed to appear as *112directed, the required appearance was in connection with a pending indictment charging a class B felony, which is an element of bail jumping in the first degree (see, Penal Law § 215.57).
County Court correctly vacated defendant’s guilty plea to the drug-related class B felony because the court lacked the authority to accept the plea (see, People v Boye, 175 AD2d 924), but the ultimate dismissal of the underlying drug charge on which defendant was admitted to bail cannot affect the validity of the bail jumping charge where, as here, the elements of the bail jumping crime were completed and satisfied prior to the disposition of the underlying charge (see, People v Eiffel, 81 NY2d 480, 484). As the alleged defect based upon defendant’s infancy defense to the underlying charge does not involve a fundamental matter (see, People v Di Donato, 211 AD2d 842, affd 87 NY2d 992), we conclude that defendant’s plea to the bail jumping charge should not be disturbed and the conviction should be affirmed.
The CPL expressly recognizes that a juvenile charged with a felony might be admitted to bail pursuant to a "securing order” (see, CPL 500.10 [5]) before the issue of his age is raised (see, CPL 180.75 [3] [c]; 725.05 [7]).