
35 So.3d 1088 (2010)
STATE of Louisiana In the Interest of T.C.
No. 2009 KW 1852.
Court of Appeal of Louisiana, First Circuit.
February 12, 2010.
Rehearing Denied February 23, 2010.
Writ Denied March 31, 2010.
Hillar Moore, District Attorney, Melanie Fields, Assistant District Attorney, Baton Rouge, LA, for Relator State of Louisiana.
A. Hays Town, III, Baton Rouge, LA, for Defendant/Respondent T.C.
Michael A. Mitchell, Chief/Director Public Defender, Mark D. Plaisance, Assistant Public Defender, Baton Rouge, LA, Amicus Curiae.
H. Clay Walker V, Julie Hayes Kilborn, Louisiana Association of Criminal, Defense *1089 Lawyers, Baton Rouge, LA, Amicus Curiae.
Robert Lancaster, Jack S. Harrison, Lucy S. McGough (pro hac vice), Robert Savage, Student Attorney, Juvenile Defense Clinic, LSU Law Center, Baton Rouge, LA, Amicus Curiae.
Before CARTER, C.J., GUIDRY, and PETTIGREW, JJ.
GUIDRY, J.
The 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 certiorari, 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 Rondale 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 the 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 proceedings *1090 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):
(1) 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.
*1091 Subsection (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 incapable juvenile are stayed. However, under the circumstances *1092 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. 532(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 833 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, the 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.
CARTER, C.J., dissenting.
This court granted a writ of certiorari in order to review the res nova issue of whether a juvenile court is divested of jurisdiction if, during the pendency of competency proceedings in juvenile court pursuant to La. Ch.Code art. 305 E, the minor is indicted in district court with second degree murder and armed robbery. The majority concludes that there is no error in the juvenile court's continued exercise of jurisdiction.
After a thorough review of the law, jurisprudence, record, and briefs of the parties, as well as the amicus briefs, I respectfully dissent. I respectfully submit that the majority opinion is clearly in error in holding that the juvenile court has jurisdiction in the case sub judice.

PROCEDURAL HISTORY
T.C. and Rondale Simpson allegedly committed the armed robbery of Frederick Wright and the second degree murder of Theodore Lange on April 24, 2009. This application for supervisory writs solely concerns the state's case against T.C. T.C. was born on June 24, 1993, and was 15 on the date of the alleged offenses.
T.C. was taken into custody on May 15, 2009. A detention hearing was scheduled in juvenile court but was continued several *1093 times. On July 8, 2009, counsel for T.C. filed in juvenile court a motion for a psychiatric examination. 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. On July 14, 2009, the juvenile court granted the motion and appointed two professionals to serve on the competency commission.
Prior to the competency hearing, the district attorney, on August 13, 2009, secured a grand jury indictment in district court charging T.C. with armed robbery (La. R.S. 14:64) and second degree murder (La. R.S. 14:30.1).
The state filed a motion in the district court to transfer the child from the custody of the juvenile court to the East Baton Rouge Parish Prison. The state maintained that, pursuant to La. Ch.Code art. 305 A(2), the child was subject to the exclusive jurisdiction of the district court. The district court granted the motion to transfer.
After the indictment was filed and before the juvenile court held the competency hearing, the state objected to the juvenile court's continued exercise of jurisdiction and moved to dismiss the juvenile proceedings. On October 14, 2009, the juvenile court denied the state's motion, reasoning that an indictment issued in district court in violation of La. Ch. Code art. 305 E (prior to resolution of the juvenile's mental capacity to proceed) does not divest the juvenile court of jurisdiction.
The state filed an expedited application with this court requesting a writ of prohibition to enjoin the juvenile court from exercising jurisdiction.[1] This court granted supervisory writs in order to determine the legal correctness of the juvenile court's action. This court also granted a writ of certiorari, stayed the proceedings in both the juvenile court and the district court, and ordered the parties to file briefs and appear for oral argument.
Prior to oral argument, this court granted leave to the East Baton Rouge Parish Public Defender, the Louisiana Association of Criminal Defense Lawyers, and the Juvenile Defense Clinic of the Louisiana State University Law Center to file amicus briefs.

DISCUSSION
The determination of guilt or innocence, the detention, and the custody of a person alleged to have committed a crime prior to his seventeenth birthday shall be pursuant to special juvenile procedures provided for by law. La. Const, art. V, § 19. The legislature may, however, provide that "special juvenile procedures shall not apply" to juveniles, such as T.C, who are arrested for having committed specified serious offenses, such as second degree murder or armed robbery. See La. Const, art. V, § 19.
The jurisdictional provisions authorized by Article V, § 19, are contained in Title III of the Louisiana Children's Code. State v. Hamilton, 96-0107 (La.7/2/96), 676 So.2d 1081, 1082. The court exercising juvenile jurisdiction (the juvenile court) does not have jurisdiction over children subject to district court jurisdiction for prosecution as an adult pursuant to La. Ch.Code art. 305, et seq., or children transferred by the juvenile court to the district court for prosecution as an adult pursuant *1094 to La. Ch.Code art. 857, et seq. La. Ch. Code art. 303(1); State ex rel. D.J., 2001-2149 (La.5/14/02), 817 So.2d 26, 33 n. 10.
Pursuant to Article 305, jurisdiction over juvenile criminal offenders fifteen or older at the time of the commission of certain specified offenses initially vests exclusively in the juvenile court. Hamilton, 676 So.2d at 1082. When a divesting event occurs, the juvenile court is divested of its initial jurisdiction, and the district court obtains jurisdiction over the proceedings. See Hamilton, 676 So.2d at 1082. Louisiana Children's Code article 305 effectively gives district courts jurisdiction over juveniles charged with the most serious offenses. State v. Jacobs, XXXX-XXXX (La.App. 5 Cir. 5/31/05), 904 So.2d 82, 91, writ denied, 2005-2072 (La.4/28/06), 927 So.2d 282, cert. denied, 549 U.S. 956, 127 S.Ct. 385, 166 L.Ed.2d 276 (2006).
T.C. was indicted for the offenses of second degree murder and armed robbery. Both of these offenses are recognized as serious offenses subject to district court jurisdiction pursuant to Article 305. For purposes of Article 305, second degree murder and armed robbery are treated differently.
Subsection A of Article 305 provides that the juvenile court is divested of jurisdiction when either (1) an indictment is obtained or (2) when the juvenile court finds probable cause that the accused committed certain offenses, such as second degree murder, that are punishable by death or life imprisonment. See Hamilton, 676 So.2d at 1082. By law, juvenile court jurisdiction is automatically waived in such cases. Hamilton, 676 So.2d at 1082. An offender fifteen years of age or older "must be tried as an adult" for the offenses listed in Section A(l), including second degree murder. Hamilton, 676 So.2d at 1082; State ex rel. Jackson, 99-2977 (La.App. 4 Cir. 3/22/00), 757 So.2d 900, 903. The juvenile is subject to the "exclusive" jurisdiction of the appropriate court, which for crimes listed in Section A(l) is the district court. See La. Ch.Code art. 305 A(2); Jackson, 757 So.2d at 903. Stated differently, upon the filing of the indictment charging T.C. with second degree murder, T.C. "was automatically excluded from the jurisdiction of the juvenile courts for all subsequent procedures concerning that charge." See State v. Taylor, 97-2048 (La.App. 1 Cir. 6/29/98), 716 So.2d 178, 181, writ denied, 98-2792 (La.2/26/99), 738 So.2d 1066. The state must proceed in district court on the second degree murder charge; it cannot elect to proceed pursuant to a delinquency petition filed in juvenile court.
For certain other serious crimes, including armed robbery, Subsection B of Article 305 provides a different mechanism for the transfer of jurisdiction to the district court. Thereunder, a juvenile is subject to the exclusive jurisdiction of the juvenile court until either (1) an indictment is returned charging the juvenile with armed robbery, or (2) the juvenile court holds a continued custody hearing and finds probable cause that the child has committed armed robbery and a bill of information is filed charging the juvenile with armed robbery. See Hamilton, 676 So.2d at 1082. For crimes listed in Subsection B, the prosecutor's charging decision determines in which forum the case will be heard; the district attorney has "complete discretion." Hamilton, 676 So.2d at 1082-1083. "[O]nce the prosecutor decides to charge the juvenile as an adult, whether by indictment or bill of information, the criminal court must exercise its jurisdiction." Hamilton, 676 So.2d at 1083. Therefore, once the district attorney secured an indictment for armed robbery, jurisdiction rested solely with the district court.
*1095 By 2008 La. Acts No. 222, § 1 (eff. June 16, 2008), Subsection E was added to Article 305. Subsection E provides:
(1) 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.
(2) When a child has been charged with one or more of the crimes listed in Article 857,[2] has reached twenty-one years of age 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.
(Footnote provided.)
The majority opinion holds that, pursuant to Article 305 E, upon entry of the juvenile court order for appointment of a sanity commission, exclusive jurisdiction remains with the juvenile court and, except for the filing of a delinquency petition, no further steps to prosecute the child may be taken until the juvenile court determines T.C.'s mental incapacity to proceed in accordance with Chapter 7 of Title VIII.[3] Such would be true if the case remained within the exclusive jurisdiction of the juvenile court; however, in this instance, the juvenile court was divested of jurisdiction, and jurisdiction was transferred to the district court.
Defense counsel obtained an order from the juvenile court for appointment of a competency commission prior to the state instituting proceedings in the juvenile court or in the district court. As evidenced by the indictment, the State has elected to charge the defendant as an adult and proceed against him in district court. The decision to charge the armed robbery in district court is within the discretion of the district attorney.[4]See La. Ch.Code art. 305 B. Prosecution of the charge of second degree murder must take place in district court. See La. Ch.Code art. 305 A; Hamilton, 676 So.2d at 1082.
Once the indictment against T.C. was filed, the juvenile court was divested of jurisdiction and was no longer "a court exercising criminal jurisdiction." As a matter of law, jurisdiction is vested in the district court, and the district court is the proper forum for determining T.C.'s mental capacity to proceed. Even when prosecuted as adults in district court, juveniles *1096 can seek a special sanity hearing to be conducted in accordance with articles 833 through 836 of the Louisiana Children's Code, which provisions are found in Chapter 7 of Title VIII. La.Code Crim. P. art. 644.1; compare La. Ch.Code art. 305 E(1)(b) (mental capacity to proceed is to be determined in accordance with Chapter 7 of Title VIII).

CONCLUSION
A defendant cannot interfere with the automatic jurisdictional provision found in Article 305 A and the discretionary jurisdictional provision found in Article 305 B simply by obtaining an order from the juvenile court for appointment of a sanity commission prior to the institution of prosecution in district court or the filing of a delinquency petition in juvenile court. I respectfully submit that the majority opinion to the contrary is in error. Upon the filing of the indictment charging T.C. as an adult with the crimes of second degree murder and armed robbery, the juvenile court was divested of jurisdiction, and exclusive jurisdiction was given to the district court.
Accordingly, I would grant the state's application for supervisory writs to review the correctness of the juvenile court judgment; reverse the October 1, 2009, order of the juvenile court; grant the State's motion to dismiss the proceedings in juvenile court; and lift all stays issued by this court.
For the above-stated reasons, I respectfully dissent.
NOTES
[1]  The state's expedited writ application was filed with this court and identified as arising from the Nineteenth Judicial District Court, Parish of East Baton Rouge; however, the state is not challenging any ruling from the district court judge. Rather, the state is challenging the actions of the Juvenile Court of East Baton Rouge Parish.
[2]  Louisiana Children's Code article 857 includes second degree murder and armed robbery when committed with a firearm. La. Ch.Code art. 857 A(2), (6).
[3]  Title VIII of the Louisiana Children's Code is entitled "Delinquency." Chapter 7 of Title VIII specifically addresses issues regarding a child's mental incapacity to proceed.
[4]  The Louisiana constitution provides that, except as otherwise provided for in the constitution, a district attorney, or his designated assistant, has "charge of every criminal prosecution by the state in his district." La. Const, art. V, § 26(B). The district attorney has the entire charge and control of every criminal prosecution instituted or pending in his district and determines "whom, when, and how he shall prosecute." La.Code Crim. P. art. 61. To interpret Article 305 E as suggested by defense counsel is to place charge of a criminal prosecution with defense counsel rather than with the district attorney. Defense counsel could circumvent, or manipulate, the automatic jurisdictional provision of Article 305 A and the discretionary jurisdictional provision of Article 305 B by obtaining an order appointing a sanity commission prior to the district attorney effecting a legal action against a juvenile accused of a serious crime.
