¶1*420*451We granted N.C. leave to appeal from the Law Division's order directing the Office of the Public Defender to obtain and pay for the competency evaluation the court determined was required before the State could proceed against him on two juvenile complaints. We now reverse and remand with instructions that the court follow the procedure specified in N.J.S.A. 2C:4-4 to -6 for determining N.C.'s fitness to proceed.
¶2N.C., fourteen years old, was charged in two juvenile complaints with delinquency for conduct that would have constituted first-degree aggravated sexual assault, N.J.S.A. 2C:14-2(a)(1), second-degree sexual assault, N.J.S.A. 2C:14-2(b), and two counts of third-degree endangering the welfare of a child, N.J.S.A. 2C:24-4(a)(1), if committed by an adult. The alleged victims were N.C.'s younger brother and his niece. The offenses allegedly occurred *452when N.C. was twelve and the victims six and five years old. Although we are not privy to the details, the Division of Child Protection and Permanency (DCPP) apparently removed N.C. from his home following the allegations of abuse. He is now in placement at Bonnie Brae.
¶3Following consultation with the Law Guardian appointed to represent N.C. in the DCPP matter, N.C.'s initial counsel in this case, a pool attorney appointed by the Office of the Public Defender, made a motion to have N.C. examined by the Department of Human Services (DHS) for fitness to proceed pursuant to N.J.S.A. 2C:4-5(a)(2).
¶4The assistant prosecutor declined to take a position on whether N.C.'s proofs were sufficient to raise a reasonable doubt as to his fitness to proceed or whether N.J.S.A. 2C:4-5 applied to juveniles. She argued, however, that if the court ordered the competency evaluation at the Public Defender's request, the Public Defender should pay for the evaluation. DHS was noticed of the application, and a deputy attorney general appeared on its behalf. The deputy argued the Division of Mental Health and Addiction Services in DHS "does not have psychiatrists or psychologists who are qualified to forensically evaluate children as to their competency to proceed in a court proceeding," and that N.J.S.A. 2C:4-5 applies only to adults.
¶5The court found a competency evaluation was necessary but concluded it did not "have the authority to order ... another State agency besides the Office of the Public Defender ... to pay for it." Reasoning that "the public defender's office exists for the purpose of defending adults and juveniles in the criminal justice system or the juvenile justice system who are indigent," the court found "part [and] parcel of that is to have some [fund] availability for experts." Accordingly, it entered an order finding N.C. in need of a competency evaluation and directing the Office of the Public Defender to provide and pay for it.
¶6The Deputy Public Defender for Warren County substituted himself into the case and moved for reconsideration. In addition to the arguments raised by the pool attorney, the deputy public defender argued the order could work to make the Public Defender the instrument of N.C.'s undoing by forcing it to produce a report contrary to N.C.'s interests. He argued N.J.S.A. 2C:4-4 to -6 clearly apply to juveniles, and DHS is the appropriate State entity to produce the independent evaluation of competency the Legislature contemplated. He further argued the court's order effectively shifted to N.C. the burden of proving his incompetency *454contrary to the statutory scheme, which places the burden on the prosecution to prove N.C. has the capacity to understand the proceedings against him and to assist in his own defense before he can be tried, adjudicated delinquent or sentenced.
¶7The prosecutor and DHS opposed reconsideration. The prosecutor claimed the State had no burden to prove a defendant's competency under the statute until after DHS produced a report opining the defendant did not have the capacity to understand the proceedings or assist in his defense.
¶8DHS filed a brief advising the court the Division of Mental Health and Addiction Services (DMHAS) had recently been transferred from DHS to the Department of Health (DOH) in an executive reorganization, and "[t]hus all statutory references to DHS which implicate DMHAS are now read to apply to DOH." The deputy, now claiming to represent DOH, continued to insist "nothing in N.J.S.A. 2C:4-5 or the Juvenile Justice Code authorizes the Public Defender to compel DHS [or DOH] to conduct a competency evaluation of a juvenile," and that "DHS is not authorized by law or equipped with the resources and expertise to provide competency evaluations of juveniles, or indeed to provide services to juveniles at all." The deputy further contended the Supreme Court had already determined the Public Defender the appropriate entity to fund competency evaluations for its clients in State v. Martini, 144 N.J. 603, 617, 677 A.2d 1106 (1996) ( *455Martini III ) (deeming it "not unfair" that the Office of the Public Defender absorb the cost of the competency evaluation it sought to prove Martini was incompetent to waive post-conviction relief proceedings and an application to stay his execution during the pendency of those proceedings), cert. denied, 519 U.S. 1063, 117 S.Ct. 699, 136 L.Ed.2d 621 (1997).
¶9After hearing argument, the court reaffirmed its decision to require the Office of the Public Defender to obtain and pay for the evaluation the court deemed necessary before the case could proceed further against N.C. Noting N.J.S.A. 2C:4-5 does not expressly apply to juveniles, the court determined to "follow the Martini decision," which it deemed "crystal clear" and "the last word on this." On appeal, the parties reprise the arguments they made to the trial court. DHS adds that N.C. has no constitutional right to a competency evaluation performed or paid for by DHS and no statutory right to a competency evaluation because a competency evaluation "is not a 'defense available to an adult.' "
¶10We granted leave to resolve the issue of whether the competency statutes of the criminal code, specifically N.J.S.A. 2C:4-4 to -6, apply to juveniles. We conclude the statutes do apply to juveniles, and that N.J.S.A. 2C:4-5(a)(2) requires DHS, or its successor, to provide or arrange for examination of a juvenile for fitness to proceed as DHS would for an adult, with such accommodation for the juvenile's youth as is necessary and appropriate. Cf.In re Commitment of N.N., 146 N.J. 112, 135, 679 A.2d 1174 (1996) (determining "the concept of 'mental illness' that constitutes a condition for the involuntary commitment of a minor must be adapted and related to juveniles as a class, and must take into account the characteristics and needs that are unique to the young, immature, and developing person").
¶11The juvenile code guarantees to juveniles "[a]ll defenses available to an adult charged with a crime," and, but for indictment, trial by jury and bail, all rights under the Federal and State Constitutions guaranteed to adult criminal defendants. N.J.S.A. 2A:4A-40 ;
¶12*456State ex rel. P.M.P., 200 N.J. 166, 173-74, 975 A.2d 441 (2009) ; State v. Franklin, 175 N.J. 456, 465, 815 A.2d 964 (2003). It is beyond cavil that an adult defendant "tried or convicted while incompetent to stand trial has been *423deprived of his or her due process right to a fair trial." State v. Purnell, 394 N.J. Super. 28, 47, 925 A.2d 71 (App. Div. 2007) (citing Pate v. Robinson, 383 U.S. 375, 378, 86 S.Ct. 836, 15 L.Ed.2d 815 (1966) ); State v. Cecil, 260 N.J. Super. 475, 482, 616 A.2d 1336 (App. Div. 1992).
¶13It follows, of course, that a juvenile, such as N.C., has the same due process right as does an adult not to be tried or adjudicated delinquent while incompetent to stand trial. N.J.S.A. 2A:4A-40. We held this to be so more than four decades ago in the wake of In re Gault, 387 U.S. 1, 41, 87 S.Ct. 1428, 18 L.Ed.2d 527 (1967) (holding children entitled to due process protections in juvenile delinquency proceedings). SeeState in Interest of R.G.W., 135 N.J. Super. 125, 128-30, 342 A.2d 869 (App. Div. 1975) (finding pre-code statute "Finding of insanity; disposition," N.J.S.A. 2A:163-2, to apply to juveniles, although juveniles not specifically referenced in the words of the statute), aff'dsub nom.State in Interest of W., 70 N.J. 185, 358 A.2d 473 (1976).
¶14The Legislature has chosen to safeguard a defendant's right not to be tried or convicted while incompetent to stand trial by the procedures set forth in N.J.S.A. 2C:4-4 to -6, State v. Gorthy, 226 N.J. 516, 530-32, 145 A.3d 146 (2016), which we characterized as having "significantly altered" pre-code procedures "and, for the first time, established a comprehensive statutory standard for competency determinations," State v. Handy, 421 N.J. Super. 559, 587, 25 A.3d 1140 (App. Div. 2011), aff'd as modified, 215 N.J. 334, 73 A.3d 421 (2013). They have no equivalent in the Code of Juvenile Justice, N.J.S.A. 2A:4A-20 to -48, notwithstanding the juvenile code's express prohibition against permitting a juvenile "found to lack mental capacity" to "waive any right," N.J.S.A. 2A:4A-39(b)(3).
¶15As the juvenile code obviously contemplates a judicial finding of a juvenile's "mental capacity" but establishes no procedure or standard for determining it, it is reasonable to conclude, *457as the State and N.C. did here, that the Legislature did not intend to limit the provisions of N.J.S.A. 2C:4-4 to -6 to adult defendants.
¶16DHS has not pointed to any statute that would prevent it from accepting appointment to evaluate N.C. SeeJ.S., 202 N.J. at 480, 998 A.2d 409 (noting powers of administrative agencies "are limited to those expressly granted by statute or those fairly implied as necessary to carry out their assigned function") (internal quotation marks omitted). And because of its failure to submit a certification from someone at the agency attesting to the limited scope of its current powers and responsibilities with regard to minors, the record is devoid of any competent evidence that would permit a court to find DHS incapable of accepting the appointment. Its remaining arguments as to why N.J.S.A. 2C:4-5 does not apply to juveniles, that the constitution does not provide for a competency evaluation performed or paid for by DHS and a *459competency evaluation "is not a 'defense available to an adult,' " are entirely without merit and require no further discussion.
¶17We share the trial court's frustration at DHS's failure to accept appointment pursuant to N.J.S.A. 2C:4-5(a)(2), as DHS routinely does in criminal cases and would were the juvenile waived to adult court, see N.J.S.A. 2A:4A-26.1(f)(1) and R. 5:22-4(a), or otherwise identify the agency which has succeeded to its powers to do so in juvenile matters.
¶18First, in Martini III the Office of the Public Defender sought a competency evaluation of Martini in support of its argument that he was incompetent to waive his right to post-conviction relief proceedings in an attempt to hasten his own execution. 144 N.J. at 606, 677 A.2d 1106. Finding "[a]n expert evaluation of Martini's competence, like his representation by private counsel, ... a service necessary to defendant's case" under those circumstances, the Court determined it "not unfair to permit the court to impose those fees on the [Office of the Public Defender]" in accordance with the Public Defender Act, N.J.S.A. 2A:158A-1 to -25, and In re Cannady, 126 N.J. 486, 600 A.2d 459 (1991). Id. at 617, 677 A.2d 1106.
¶19*460Martini had at that point already been tried and convicted, the Supreme Court had affirmed his conviction and death sentence on direct appeal and on proportionality review, the United States Supreme Court had denied Martini's petition for certiorari and the trial court had signed his death warrant. State v. Martini, 187 N.J. 469, 472, 901 A.2d 941 (2006) ( Martini IV ). Those circumstances, involving the Public Defender acting contrary to the wishes of its own client, thereby necessitating the services of both independent counsel for Martini and an expert to perform a competency evaluation, are so dissimilar to the posture of this routine juvenile proceeding as to make the case wholly inapposite, leaving aside that Martini's competency hearing took place two years before the 1998 amendment to N.J.S.A. 2C:4-5(a)(2) permitted a court to order examination of a defendant by DHS. SeeMartini III, 144 N.J. at 606, 677 A.2d 1106 (noting Martini's two-day competency hearing concluded on February 14, 1996).
¶20Second, the argument proves too much. If Martini III compels the Office of the Public Defender to procure and pay for the competency evaluation in this case, it would logically require the Office of the Public Defender to do so in adult cases, contrary to the provisions of N.J.S.A. 2C:4-5(a)(2), which it obviously does not.
¶21N.J.S.A. 2C:4-5(a)(2) expressly provides a court with the ability to order an independent examination of a defendant by DHS when, as here, it has "reason to doubt the defendant's fitness to proceed." SeePurnell, 394 N.J. Super. at 47, 925 A.2d 71. The purpose of the examination is to assist the judge " who must make the ultimate determination[ ] as to competency." State v. Moya, 329 N.J. Super. 499, 506, 748 A.2d 604 (App. Div. 2000). An expert performing such an evaluation, acts "as an arm of the court," not accountable to counsel, but to the court.
¶22*426*461Fellerman v. Bradley, 99 N.J. 493, 506, 493 A.2d 1239 (1985) (quotation omitted). "Of course, either the State or defense may also have the defendant evaluated by a psychiatrist or psychologist of their choice," Purnell, 394 N.J. Super. at 48, 925 A.2d 71, but those "partisan" evaluations are obviously done for different purposes, that is, to assist the State in securing a conviction or the defense in avoiding one. SeeState v. Harris, 181 N.J. 391, 523-26, 859 A.2d 364 (2004) (discussing importance of a defendant's access to his own psychological expert and the benefit of the adversarial process "to settling claims of mental retardation"), cert. denied, 545 U.S. 1145, 125 S.Ct. 2973, 162 L.Ed.2d 898 (2005). The trial court's order directing the Office of the Public Defender to provide and pay for the court's competency examination of N.C. improperly blurs those distinctions.
¶23Although the controversy was framed by the prosecutor and DHS as an argument over which State entity was going to have to "foot the bill" for N.C.'s competency evaluation, the issue concerns more than money. The Office of the Public Defender argues here, as it did in the trial court, that the court overstepped its bounds in ordering the Public Defender to provide an expert report necessary to prosecute N.C. and unrelated to his defense, contrary to its enabling legislation. SeeState v. Cann, 342 N.J. Super. 93, 105, 775 A.2d 733 (App. Div. 2001). It claims the order also interferes with its attorney-client relationship with N.C. by making the Public Defender an instrument of the prosecution, thereby burdening N.C.'s Sixth Amendment right to counsel and violating N.C.'s statutory right to the confidentiality of his juvenile mental health reports, N.J.S.A. 2A:4A-60 to -60.3.
¶24*462The concerns expressed by the Public Defender are not illusory ones. SeeEstelle v. Smith, 451 U.S. 454, 470-71, 101 S.Ct. 1866, 68 L.Ed.2d 359 (1981) (holding defendant's Fifth and Sixth Amendments rights implicated by court-ordered pre-trial competency examination). Ordering the Office of the Public Defender to produce and pay for the competency examination made necessary by the court's finding of a bona fide doubt as to an indigent juvenile's fitness to proceed raises a host of potential problems, some possibly of a constitutional dimension. SeeState v. Mingo, 77 N.J. 576, 581-87, 392 A.2d 590 (1978) (refusing to permit the State to obtain and use the opinion of a defendant's consulting expert based on the constitutional right of effective assistance of counsel implicit in the Sixth Amendment and article I, paragraph 10 of the New Jersey Constitution ); see alsoUnited States v. Alvarez, 519 F.2d 1036, 1046 (3d Cir. 1975) (holding defense counsel in a case involving a potential defense of insanity must be free to hire a psychiatric expert to advise him with respect to the defendant's mental condition without risk of creating a potential government witness). Accordingly, we agree with the Office of the Public Defender that the trial court was without authority to order the defense to procure and pay for a competency examination of N.C. to be shared with the prosecution.
¶25The trial court having concluded there is a bona fide doubt as to N.C.'s fitness to proceed, it is to adhere to the constitutionally sound framework specified in *427N.J.S.A. 2C:4-4 to -6 for determining whether the boy has the capacity to understand the proceedings against him and to assist in his own defense. Given the delay already attendant to these proceedings, the trial court should order DHS to provide or arrange for the examination of N.C. at the agency's earliest convenience. Should DHS contend its obligations as they relate to juveniles under N.J.S.A. 2C:4-5(a)(2) have been transferred to another agency, the Commissioner or her designee should advise the court promptly of the agency that will act in DHS's stead. *463Reversed and remanded for further proceedings not inconsistent with this opinion. We do not retain jurisdiction.
¶26The statute provides in pertinent part:
a. Whenever there is reason to doubt the defendant's fitness to proceed, the court may on motion by the prosecutor, the defendant or on its own motion, appoint at least one qualified psychiatrist or licensed psychologist to examine and report upon the mental condition of the defendant. The psychiatrist or licensed psychologist so appointed shall be either:
(1) From a list agreed to by the court, the prosecutor and the defendant; or
(2) Agreed to by the court, prosecutor and defendant.
¶27Alternatively, the court may order examination of a defendant for fitness to proceed by the Department of Human Services. The department shall provide or arrange for examination of the defendant at a jail, prison or psychiatric hospital. However, to ensure that a defendant is not unnecessarily hospitalized for the purpose of the examination, a defendant shall not be admitted to a State psychiatric hospital for an examination regarding his fitness to proceed unless a qualified psychiatrist or licensed psychologist designated by the commissioner determines that hospitalization is clinically necessary to perform the examination. Whenever the qualified psychiatrist or licensed psychologist determines that hospitalization is clinically necessary to perform the examination, the court shall order the defendant to be committed to the custody of the Commissioner of Human Services for placement in a State psychiatric hospital designated for that purpose for a period not exceeding 30 days.
¶28A qualified psychiatrist or licensed psychologist retained by the defendant or by the prosecutor shall, if requested, be permitted to examine a defendant who has been admitted to a State psychiatric hospital.
¶29As the trial court found a bona fide doubt as to N.C.'s fitness to proceed, the State cannot secure an adjudication of delinquency, whether by trial or guilty plea, until his competency can be established. SeeState v. Purnell, 394 N.J. Super. 28, 47, 925 A.2d 71 (App. Div. 2007). Accordingly, we do not agree with the prosecutor's statement. The Court having determined a neutral evaluation appropriate, we agree that neither the prosecution nor the defense was required to produce its own report at this stage of the proceedings. See N.J.S.A. 2C:4-5 and discussion infra at pp. 460-61, 182 A.3d at 425-26.
¶30Likewise, no Part V rule addresses competency of juveniles. "In the absence of a relevant rule in Part V, '[j]uvenile delinquency actions shall be governed by the rules in Part III.' " State in Interest of N.H., 226 N.J. 242, 253, 141 A.3d 1178 (2016) (quoting R. 5:1-1). R. 3:12-1 provides for written notice to the prosecutor of a defendant's intent to rely on section 2C:4-1 of the criminal code addressing insanity and permits the court to "make such other orders as the interest of justice requires." Comment 2.4 to the Rule addresses "Competency to plead or stand trial." Pressler & Verniero, Current N.J. Court Rules, cmt. 2.4 on R. 3:12-1 (2018). R. 5:1-1 and R. 3:12-1 provide further support for our conclusion that the procedures mandated by N.J.S.A. 2C:4-4 to -6 for ensuring a defendant's competency to stand trial apply to juveniles. SeeN.H., 226 N.J. at 253, 141 A.3d 1178.
¶31We have little doubt that DHS in 1998 could have provided or arranged for the examination of a juvenile for fitness to proceed, given at that time DCPP (then known as the Division of Youth and Family Services), DMHAS's predecessor, the Division of Mental Health Services, N.J.A.C. 10:30-1.1(a), and the Division of Developmental Disabilities (DDD) were all part of DHS. SeeState ex rel. R.M., 141 N.J. 434, 448, 450, 661 A.2d 1277 (1995) (noting the creation of DDD in DHS with the powers and duties of the former Division of Mental Retardation and existing statutes and court rules authorizing "the family court to refer a delinquent juvenile who may be developmentally disabled to the DDD for evaluation, prior to ordering a disposition"). The current court rule governing the involuntary civil commitment of minors, R. 4:74-7A, would suggest a continued role for DHS in the oversight of "assessment" and "evaluation" of minors in need of intensive psychiatric treatment.
¶32DHS has not argued its obligations as they relate to juveniles under N.J.S.A. 2C:4-5(a)(2) have been transferred to other agencies. We note, however, the provision of the juvenile code governing disposition of delinquency cases, N.J.S.A. 2A:4A-43, has been twice amended in recent years to substitute DCF for DHS in N.J.S.A. 2A:4A-43(b)(5) and (b)(7), and the Commissioner of Children and Families for the Commissioner of Human Services and the Division of Children's System of Care for DDD and the Division of Child Behavioral Health Services in N.J.S.A. 2A:4A-43(b)(6). SeeL. 2006, c. 47, § 24, eff. July 1, 2006; L. 2012, c. 16, § 1, eff. June 29, 2012.
¶33Although the drafters of the criminal code recommended that examination of a defendant for competency to proceed ordinarily be by an impartial expert, The New Jersey Penal Code, Final Report of the New Jersey Criminal Law Revision Commission, Commentary at 102 (1971), prior to the 1998 amendment providing for an examination by DHS, the only way for the court to secure an independent examination in the absence of agreement by the parties, was to order a thirty-day commitment to a State hospital. Cannel, New Jersey Criminal Code Annotated, cmt. 2 on N.J.S.A. 2C:4-5 (2018). Cannel argues "the first word of the new provision, 'alternatively,' suggests that in any case where there is no agreement, the court should order examination" by DHS as was done in Purnell, assuring "there is always one non-partisan expert witness" thus bringing subsection (a) "closer to the Commission recommendation than it was when first enacted." Ibid.