|sThe state filed an application with this Court requesting a writ of prohibition to enjoin the juvenile court from exercising jurisdiction. We issued a writ of certiora-ri, stayed the proceedings in both the juvenile court and the district court, and ordered the parties to file briefs and appear for oral argument. The writ application reveals a disagreement between the juvenile court and the district court as to which court has jurisdiction. The issue is whether the juvenile court is divested of jurisdiction when a juvenile is indicted in district court at a time when competency proceedings are pending in the juvenile court.
On April 24, 2009, T.C. and Róndale Simpson allegedly committed the armed robbery of Frederick Wright and the second degree murder of Theodore Lange. Based on dates listed in the indictment, T.C. was 15 and Simpson was 16 on the date of the offenses. This decision is concerned solely with the case against T.C.
T.C. was taken into custody on May 15, 2009. A detention hearing was scheduled in juvenile court but was continued. On July 8, 2009, T.C.’s attorney filed a motion in the juvenile court to have T.C. examined to determine his capacity to understand the proceedings. The motion alleged T.C. suffered from a serious psychological disturbance that caused him to lack the ability to understand the nature of the proceedings and assist counsel. The juvenile court appointed two professionals to serve on the competency commission and scheduled the matter for a hearing to determine the mental capacity of T.C. Before the hearing was held, on August 13, 2009, the grand jury indicted T.C. and Simpson in district court with armed robbery and second degree murder. The state filed a motion in the district court to transfer the child from the custody of juvenile court to the East Baton Rouge Parish Prison. The state maintained that pursuant to article 305(A)(2) of the Louisiana Children’s Code, the child was subject to the exclusive jurisdiction of |4the district court. The motion did not mention the pending competency proceedings in the juvenile court. The district court granted the motion to transfer.
After the indictment was filed and before the juvenile court held a hearing on the competency issue, the state objected to the juvenile court’s exercise of jurisdiction and moved to dismiss the proceedings. The juvenile court denied the state’s motion, confirmed the date scheduled for the competency hearing, and said the hearing would be conducted to determine the child’s capacity to proceed. The juvenile court determined that an indictment issued in district court in violation of article 305(E) of the Children’s Code does not divest the juvenile court of jurisdiction before its determination of mental competency to proceed. The judge acknowledged that cases interpreting Article 305 prior to amendment in 2008 held that an indictment in district court automatically divested the juvenile court of jurisdiction. The judge concluded the addition of subsection (E) provided for the juvenile court to retain jurisdiction “at least pending a determination of a defendant’s mental competency to proceed.”
Juvenile courts have exclusive original jurisdiction over delinquency pro*1090ceedings except when a child is subject to the original jurisdiction of the criminal courts pursuant to Article 305 et seq. or when a child has been transferred by the juvenile court for criminal prosecution as an adult pursuant to Article 857 et seq. State v. Hamilton, 96-0107 p. 2 (La.7/2/96), 676 So.2d 1081, 1082. See also La. Const. art. V, § 19. Article 305(A)(1) provides that when a child is 15 years or older at the time of the commission of first degree murder, second degree murder, aggravated rape, or aggravated kidnapping, he is subject to the exclusive jurisdiction of the juvenile court until either an indictment charging one of these offenses is returned or the juvenile court holds a continued custody hearing and finds probable cause that he committed one of the offenses. This automatic and irreversible divestiture of jurisdiction from the juvenile court to the district court is generally called “legislative waiver” because legislative fiat has automatically waived juvenile court jurisdiction in these cases. Hamilton, 96-0107 at p. 3, 676 So.2d at 1082. For these four offenses, the state does not have discretion to file a delinquency petition in juvenile court. See State ex rel. D.J., 2001-2149, p. 11 n. 10 (La.5/14/02), 817 So.2d 26, 33 n. 10.
Subsection B of Article 305 creates a different method for less serious offenses. It provides that when a child is 15 years of age or older at the time of the commission of armed robbery (and other designated offenses), he is subject to the exclusive jurisdiction of the juvenile court until whichever of the following occurs first: (1) an indictment charging the offense is returned; or (2) the juvenile court holds a continued custody hearing and finds probable cause that the child has committed the offense and a bill of information charging the offense is filed. As to the offenses listed in Article 305(B)(1) (includes armed robbery), the district attorney has discretion to file a petition alleging the offense in the juvenile court or, alternatively, to obtain an indictment or file a bill of information in the criminal court. If the child is in detention, the district attorney shall make his election and file the indictment, bill of information, or petition in the appropriate court within 30 days after the child’s arrest, unless the child waives this right. La. Ch.Code art. 305(B)(3).
If an indictment is returned or a bill of information is filed, the child is subject to the exclusive jurisdiction of the appropriate criminal court for all subsequent procedures, including the review of bail applications, and the child shall be transferred to the appropriate adult facility for detention prior to his trial as an adult. La. Ch.Code art. 305(A)(2) & (B)(4).
The provision at issue in this writ is Children’s Code article 305(E) (emphasis added):
|s(l) If a competency or sanity examination is ordered, except for the filing of a delinquency petition, no further steps to prosecute the child in a court exercising criminal jurisdiction shall occur until:
(a) Counsel is appointed for the child and notified in accordance with Article 809; and
(b) The court determines mental capacity to proceed in accordance with Chapter 7 of Title VIII.
Article 305(E)(2) provides that when a child who has been charged with second degree murder or armed robbery when committed with a firearm has reached the age of twenty-one and is incompetent, the court on its own motion or on the motion of the district attorney may conduct a hearing to consider whether to transfer the child for further proceedings to the appropriate court exercising criminal jurisdiction.
*1091Subsection (E) was added by Act 222 of 2008. Subsection (E) of Article 305 is consistent with Article 832, which provides that when the question of the child’s mental incapacity to proceed is raised, there shall be no further steps in the delinquency proceeding, “except the filing of a delinquency petition,” until counsel is appointed and notified and the child is found to have the mental capacity to proceed. Article 642 of the Code of Criminal Procedure was the source provision for Article 832 of the Children’s Code. As to proceedings governed by the Code of Criminal Procedure, Article 642 provides that when a defendant’s mental incapacity to proceed is raised there shall be no further steps in the criminal prosecution “except the institution of prosecution” until the defendant is found to have the mental capacity to proceed. Institution of prosecution is defined as the finding of an indictment or the filing of a bill of information or affidavit, which is designed to serve as the basis of a trial. La. C.Cr. P. art. 934(7). Under Article 642, when the question of the defendant’s mental capacity to proceed has been raised, all proceedings in the case are stayed until that issue is determined. La. C.Cr. P. art. 642, comment (b). An exception is made in Article 642 as to the institution of prosecution to prevent the time limit for the | institution of prosecution from running out while the proceedings are stayed. La. C.Cr. P. art. 642, comment (b).
There is no jurisprudence interpreting Article 305(E). Commentators have said the amendment requires a determination of the child’s mental capacity before proceeding to prosecute him in criminal court:
In its 2008 Session, the Legislature amended Article 305 to require a determination of a child’s mental capacity to proceed before proceeding to prosecute him or her in criminal court, if the juvenile court finds “reasonable grounds to doubt the mental capacity of the child” pursuant to Article 833. If in accordance with Articles 832-838, (the competency to proceed Chapter of the delinquency title) the child never achieves competency before reaching the age of twenty-one, the court may decide to conduct a transfer hearing to the criminal court. Transfer hearings are authorized only for the seven crimes deemed most serious. Ch. C. Art. 857(A). However, if the child is incompetent for trial as a juvenile, certainly he should similarly be found incompetent to be tried as an adult in criminal court.
Lucy S. McGough & Kerry Triche, Louisiana Children’s Code Handbook 28, authors’ note to La. Ch.Code art. 305 (2008— 2009 ed.).
The position taken by the juvenile court in this case is supported by the language of Article 305(E), which provides an exception only for the filing of a “delinquency petition.” Statutory interpretation begins with the language of the statute. Where a statute is clear and unambiguous, and its application does not lead to absurd results, the law shall be applied as written and no further interpretation may be made in search of the intent of the legislature. State v. Benoit, 2001-2712, p. 3 (La.5/14/02), 817 So.2d 11, 13. The state equates the filing of a delinquency petition in juvenile court to the institution of prosecution in district court, but the language of Article 305(E) and the definition of “institution of prosecution” do not support the state’s argument.
Concerned a bit with the prescription issue, the state says the reason an exception for institution of prosecution is necessary is to prevent the time limitations from running out while the proceedings against the alleged mentally |8incapable juvenile are stayed. However, under the circum*1092stances of this case, prescription does not appear to be a genuine concern. There is no time limit for the institution of prosecution for any crime for which the punishment may be life, such as second degree murder, and the state has six years in which to institute prosecution for an offense such as armed robbery. See La. C.Cr. P. arts. 571 & 572(A)(1). The state notes T.C. has not filed a motion to quash in the district court. One of the grounds on which a motion to quash may be based is that the court has no jurisdiction of the offense charged. La. C.Cr. P. art. 582(8). Although defense counsel apparently has not filed a motion to quash, he did file a written objection to the district court’s exercise of jurisdiction.
We note that if the state had secured the indictment before counsel raised the issue of the child’s competency, jurisdiction automatically would have been in the district court. Even in the district court, juveniles may seek a special sanity hearing to be conducted in accordance with Articles 888 through 836 of the Children’s Code. La. C.Cr. P. art. 644.1. However, in those cases where the competency of the child is raised in juvenile court before the state secures an indictment, the state has no authority to get an indictment until the child has been found competent. Article 305(E) of the Children’s Code is an exception to Sections (A) and (B) of article 305. Subsection (E) ensures that the juvenile court retains jurisdiction while the mental capacity of the juvenile is under consideration. If the child is found competent in the juvenile court, trial in the criminal court is not prevented. Only those children who are found incompetent would be shielded from criminal prosecution. Article 305(E) temporarily prevents a transfer from the juvenile court to the criminal court until a determination of competency is made.
Accordingly, there being no error in the juvenile court’s exercise of jurisdiction and the denial of the state’s motion, the writ of certiorari is recalled, |9the state’s writ application is denied, and the stays previously issued by this Court are lifted.
WRIT OF CERTIORARI RECALLED; STAYS LIFTED; AND WRIT APPLICATION DENIED.
CARTER C.J., dissents with reason.
PETTIGREW, J., concurs.