(a) Competency requirement. Definition. A defendant shall not be tried, convicted or sentenced while the defendant is not competent. For the purposes of this section, a defendant is not competent if the defendant is unable to understand the proceedings against him or her or to assist in his or her own defense.

Attorney's Note

Under the Connecticut General Statutes, punishments for crimes depend on the classification. In the case of this section:
ClassPrisonFine
Class B felonyup to 20 yearsup to $15,000
Class C felonyup to 10 yearsup to $10,000
For details, see Conn. Gen. Stat.53a-35a

Terms Used In Connecticut General Statutes 54-56d

  • another: may extend and be applied to communities, companies, corporations, public or private, limited liability companies, societies and associations. See Connecticut General Statutes 1-1
  • Bail: Security given for the release of a criminal defendant or witness from legal custody (usually in the form of money) to secure his/her appearance on the day and time appointed.
  • Conviction: A judgement of guilt against a criminal defendant.
  • Defendant: In a civil suit, the person complained against; in a criminal case, the person accused of the crime.
  • Evidence: Information presented in testimony or in documents that is used to persuade the fact finder (judge or jury) to decide the case for one side or the other.
  • Guardian: A person legally empowered and charged with the duty of taking care of and managing the property of another person who because of age, intellect, or health, is incapable of managing his (her) own affairs.
  • intellectual disability: means a significant limitation in intellectual functioning existing concurrently with deficits in adaptive behavior that originated during the developmental period before eighteen years of age. See Connecticut General Statutes 1-1g
  • Probable cause: A reasonable ground for belief that the offender violated a specific law.
  • Probate: Proving a will
  • Public defender: Represent defendants who can't afford an attorney in criminal matters.
  • Remainder: An interest in property that takes effect in the future at a specified time or after the occurrence of some event, such as the death of a life tenant.
  • Testify: Answer questions in court.
  • Testimony: Evidence presented orally by witnesses during trials or before grand juries.
  • Trial: A hearing that takes place when the defendant pleads "not guilty" and witnesses are required to come to court to give evidence.

(b) Presumption of competency. A defendant is presumed to be competent. The burden of proving that the defendant is not competent by a preponderance of the evidence and the burden of going forward with the evidence are on the party raising the issue. The burden of going forward with the evidence shall be on the state if the court raises the issue. The court may call its own witnesses and conduct its own inquiry.

(c) Request for examination. If, at any time during a criminal proceeding, it appears that the defendant is not competent, counsel for the defendant or for the state, or the court, on its own motion, may request an examination to determine the defendant’s competency.

(d) Examination of defendant. Report. If the court finds that the request for an examination is justified and that, in accordance with procedures established by the judges of the Superior Court, there is probable cause to believe that the defendant has committed the crime for which the defendant is charged, the court shall order an examination of the defendant as to his or her competency. The court may (1) appoint one or more physicians specializing in psychiatry to examine the defendant, or (2) order the Commissioner of Mental Health and Addiction Services to conduct the examination either (A) by a clinical team consisting of a physician specializing in psychiatry, a clinical psychologist and one of the following: A clinical social worker licensed pursuant to chapter 383b or a psychiatric nurse clinical specialist holding a master’s degree in nursing, or (B) by one or more physicians specializing in psychiatry, except that no employee of the Department of Mental Health and Addiction Services who has served as a member of a clinical team in the course of such employment for at least five years prior to October 1, 1995, shall be precluded from being appointed as a member of a clinical team. If the Commissioner of Mental Health and Addiction Services is ordered to conduct the examination, the commissioner shall select the members of the clinical team or the physician or physicians. When performing an examination under this section, the examiners shall have access to information on treatment dates and locations in the defendant’s treatment history contained in the Department of Mental Health and Addiction Services’ database of treatment episodes for the purpose of requesting a release of treatment information from the defendant. If the examiners determine that the defendant is not competent, the examiners shall then determine whether there is a substantial probability that the defendant, if provided with a course of treatment, will regain competency within the maximum period of any placement order under this section. If the examiners determine that there is a substantial probability that the defendant, if provided with a course of treatment, will regain competency within the maximum period of any placement order under this section, the examiners shall then determine whether the defendant appears to be eligible for civil commitment, with monitoring by the Court Support Services Division, pursuant to subdivision (2) of subsection (h) of this section. If the examiners determine that there is not a substantial probability that the defendant, if provided with a course of treatment, will regain competency within the maximum period of any placement order under this section, the examiners shall then determine whether the defendant appears to be eligible for civil commitment to a hospital for psychiatric disabilities pursuant to subsection (m) of this section and make a recommendation to the court regarding the appropriateness of such civil commitment. The court may authorize a physician specializing in psychiatry, a clinical psychologist, a clinical social worker licensed pursuant to chapter 383b or a psychiatric nurse clinical specialist holding a master’s degree in nursing selected by the defendant to observe the examination. Counsel for the defendant may observe the examination. The examination shall be completed within fifteen business days from the date it was ordered and the examiners shall prepare and sign, without notarization, a written report and file such report with the court within twenty-one business days of the date of the order. On receipt of the written report, the clerk of the court shall cause copies to be delivered immediately to the state’s attorney and to counsel for the defendant.

(e) Hearing. Evidence. The court shall hold a hearing as to the competency of the defendant not later than ten days after the court receives the written report. Any evidence regarding the defendant’s competency, including the written report, may be introduced at the hearing by either the defendant or the state, except that no treatment information contained in the Department of Mental Health and Addiction Services’ database of treatment episodes may be included in the written report or introduced at the hearing unless the defendant released the treatment information pursuant to subsection (d) of this section. If the written report is introduced, at least one of the examiners shall be present to testify as to the determinations in the report, unless the examiner’s presence is waived by the defendant and the state. Any member of the clinical team shall be considered competent to testify as to the team’s determinations. A defendant and the defendant’s counsel may waive the court hearing only if the examiners, in the written report, determine without qualification that the defendant is competent. Nothing in this subsection shall limit any other release or use of information from said database permitted by law.

(f) Court finding of competency or incompetency. If the court, after the hearing, finds that the defendant is competent, the court shall continue with the criminal proceedings. If the court finds that the defendant is not competent, the court shall also find whether there is a substantial probability that the defendant, if provided with a course of treatment, will regain competency within the maximum period of any placement order permitted under this section.

(g) Court procedure if finding that defendant will not regain competency. If, at the hearing, the court finds that there is not a substantial probability that the defendant, if provided with a course of treatment, will regain competency within the period of any placement order under this section, the court shall follow the procedure set forth in subsection (m) of this section.

(h) Court procedure if finding that defendant will regain competency. Placement of defendant for treatment or pending civil commitment proceedings. Progress report. (1) If, at the hearing, the court finds that there is a substantial probability that the defendant, if provided with a course of treatment, will regain competency within the period of any placement order under this section, the court shall either (A) order placement of the defendant for treatment for the purpose of rendering the defendant competent, or (B) order placement of the defendant at a treatment facility pending civil commitment proceedings pursuant to subdivision (2) of this subsection.

(2) (A) Except as provided in subparagraph (B) of this subdivision, if the court makes a finding pursuant to subdivision (1) of this subsection and does not order placement pursuant to subparagraph (A) of said subdivision, the court shall, on its own motion or on motion of the state or the defendant, order placement of the defendant in the custody of the Commissioner of Mental Health and Addiction Services at a treatment facility pending civil commitment proceedings. The treatment facility shall be determined by the Commissioner of Mental Health and Addiction Services. Such order shall: (i) Include an authorization for the Commissioner of Mental Health and Addiction Services to apply for civil commitment of such defendant pursuant to sections 17a-495 to 17a-528, inclusive; (ii) permit the defendant to agree to request voluntarily to be admitted under § 17a-506 and participate voluntarily in a treatment plan prepared by the Commissioner of Mental Health and Addiction Services, and require that the defendant comply with such treatment plan; and (iii) provide that if the application for civil commitment is denied or not pursued by the Commissioner of Mental Health and Addiction Services, or if the defendant is unwilling or unable to comply with a treatment plan despite reasonable efforts of the treatment facility to encourage the defendant’s compliance, the person in charge of the treatment facility, or such person’s designee, shall submit a written progress report to the court and the defendant shall be returned to the court for a hearing pursuant to subsection (k) of this section. Such written progress report shall include the status of any civil commitment proceedings concerning the defendant, the defendant’s compliance with the treatment plan, an opinion regarding the defendant’s current competency to stand trial, the clinical findings of the person submitting the report and the facts upon which the findings are based, and any other information concerning the defendant requested by the court, including, but not limited to, the method of treatment or the type, dosage and effect of any medication the defendant is receiving. The Court Support Services Division shall monitor the defendant’s compliance with any applicable provisions of such order. The period of placement and monitoring under such order shall not exceed the period of the maximum sentence which the defendant could receive on conviction of the charges against such defendant, or eighteen months, whichever is less. If the defendant has complied with such treatment plan and any applicable provisions of such order, at the end of the period of placement and monitoring, the court shall approve the entry of a nolle prosequi to the charges against the defendant or shall dismiss such charges.

(B) This subdivision shall not apply: (i) To any person charged with a class A felony, a class B felony, except a violation of § 53a-122 that does not involve the use, attempted use or threatened use of physical force against another person, or a violation of § 53a-70b of the general statutes, revision of 1958, revised to January 1, 2019, or § 14-227a or 14-227m, subdivision (1) or (2) of subsection (a) of § 14-227n, subdivision (2) of subsection (a) of § 53-21 or § 53a-56b, 53a-60d, 53a-70, 53a-70a, 53a-71, 53a-72a or 53a-72b; (ii) to any person charged with a crime or motor vehicle violation who, as a result of the commission of such crime or motor vehicle violation, causes the death of another person; or (iii) unless good cause is shown, to any person charged with a class C felony.

(i) Placement for treatment. Conditions. The placement of the defendant for treatment for the purpose of rendering the defendant competent shall comply with the following conditions: (1) The period of placement under the order or combination of orders shall not exceed the period of the maximum sentence which the defendant could receive on conviction of the charges against the defendant or eighteen months, whichever is less; (2) the placement shall be either (A) in the custody of the Commissioner of Mental Health and Addiction Services, the Commissioner of Children and Families or the Commissioner of Developmental Services, except that any defendant placed for treatment with the Commissioner of Mental Health and Addiction Services may remain in the custody of the Department of Correction pursuant to subsection (p) of this section; or, (B) if the defendant or the appropriate commissioner agrees to provide payment, in the custody of any appropriate mental health facility or treatment program which agrees to provide treatment to the defendant and to adhere to the requirements of this section; and (3) the court shall order the placement, on either an inpatient or an outpatient basis, which the court finds is the least restrictive placement appropriate and available to restore competency. If outpatient treatment is the least restrictive placement for a defendant who has not yet been released from a correctional facility, the court shall consider whether the availability of such treatment is a sufficient basis on which to release the defendant on a promise to appear, conditions of release, cash bail or bond. If the court determines that the defendant may not be so released, the court shall order treatment of the defendant on an inpatient basis at a mental health facility or facility for persons with intellectual disability. Not later than twenty-four hours after the court orders placement of the defendant for treatment for the purpose of rendering the defendant competent, the examiners shall transmit information obtained about the defendant during the course of an examination pursuant to subsection (d) of this section to the health care provider named in the court’s order.

(j) Progress reports re treatment. The person in charge of the treatment facility, or such person’s designee, or the Commissioner of Mental Health and Addiction Services with respect to any defendant who is in the custody of the Commissioner of Correction pursuant to subsection (p) of this section, shall submit a written progress report to the court (1) at least seven days prior to the date of any hearing on the issue of the defendant’s competency; (2) whenever he or she believes that the defendant has attained competency; (3) whenever he or she believes that there is not a substantial probability that the defendant will attain competency within the period covered by the placement order; (4) whenever, within the first one hundred twenty days of the period covered by the placement order, he or she believes that the defendant would be eligible for civil commitment pursuant to subdivision (2) of subsection (h) of this section; or (5) whenever he or she believes that the defendant is still not competent but has improved sufficiently such that continued inpatient commitment is no longer the least restrictive placement appropriate and available to restore competency. The progress report shall contain: (A) The clinical findings of the person submitting the report and the facts on which the findings are based; (B) the opinion of the person submitting the report as to whether the defendant has attained competency or as to whether the defendant is making progress, under treatment, toward attaining competency within the period covered by the placement order; (C) the opinion of the person submitting the report as to whether the defendant appears to be eligible for civil commitment to a hospital for psychiatric disabilities pursuant to subsection (m) of this section and the appropriateness of such civil commitment, if there is not a substantial probability that the defendant will attain competency within the period covered by the placement order; and (D) any other information concerning the defendant requested by the court, including, but not limited to, the method of treatment or the type, dosage and effect of any medication the defendant is receiving. Not later than five business days after the court finds either that the defendant will not attain competency within the period of any placement order under this section or that the defendant has regained competency, the person in charge of the treatment facility, or such person’s designee, or the Commissioner of Mental Health and Addiction Services with respect to any defendant who is in the custody of the Commissioner of Correction pursuant to subsection (p) of this section, shall provide a copy of the written progress report to the examiners who examined the defendant pursuant to subsection (d) of this section.

(k) Reconsideration of competency. Hearing. Involuntary medication. Appointment and duties of health care guardian. (1) Whenever any placement order for treatment is rendered or continued, the court shall set a date for a hearing, to be held within ninety days, for reconsideration of the issue of the defendant’s competency. Whenever the court (A) receives a report pursuant to subsection (j) of this section which indicates that (i) the defendant has attained competency, (ii) the defendant will not attain competency within the remainder of the period covered by the placement order, (iii) the defendant will not attain competency within the remainder of the period covered by the placement order absent administration of psychiatric medication for which the defendant is unwilling or unable to provide consent, (iv) the defendant would be eligible for civil commitment pursuant to subdivision (2) of subsection (h) of this section, or (v) the defendant is still not competent but has improved sufficiently such that continued inpatient commitment is no longer the least restrictive placement appropriate and available to restore competency, or (B) receives a report pursuant to subparagraph (A)(iii) of subdivision (2) of subsection (h) of this section which indicates that (i) the application for civil commitment of the defendant has been denied or has not been pursued by the Commissioner of Mental Health and Addiction Services, or (ii) the defendant is unwilling or unable to comply with a treatment plan despite reasonable efforts of the treatment facility to encourage the defendant’s compliance, the court shall set the matter for a hearing not later than ten days after the report is received. The hearing may be waived by the defendant only if the report indicates that the defendant is competent. With respect to a defendant who is in the custody of the Commissioner of Correction pursuant to subsection (p) of this section, the Commissioner of Mental Health and Addiction Services shall retain responsibility for providing testimony at any hearing under this subsection. The court shall determine whether the defendant is competent or is making progress toward attaining competency within the period covered by the placement order. If the court finds that the defendant is competent, the defendant shall be returned to the custody of the Commissioner of Correction or released, if the defendant has met the conditions for release, and the court shall continue with the criminal proceedings. If the court finds that the defendant is still not competent but that the defendant is making progress toward attaining competency, the court may continue or modify the placement order. If the court finds that the defendant is still not competent but that the defendant is making progress toward attaining competency and inpatient placement is no longer the least restrictive placement appropriate and available to restore competency, the court shall consider whether the availability of such less restrictive placement is a sufficient basis on which to release the defendant on a promise to appear, conditions of release, cash bail or bond and may order continued treatment to restore competency on an outpatient basis. If the court finds that the defendant is still not competent and will not attain competency within the remainder of the period covered by the placement order absent administration of psychiatric medication for which the defendant is unwilling or unable to provide consent, the court shall proceed as provided in subdivisions (2), (3) and (4) of this subsection. If the court finds that the defendant is eligible for civil commitment, the court may order placement of the defendant at a treatment facility pending civil commitment proceedings pursuant to subdivision (2) of subsection (h) of this section.

(2) If the court finds that the defendant will not attain competency within the remainder of the period covered by the placement order absent administration of psychiatric medication for which the defendant is unwilling or unable to provide consent, and after any hearing held pursuant to subdivision (3) of this subsection, the court may order the involuntary medication of the defendant if the court finds by clear and convincing evidence that: (A) To a reasonable degree of medical certainty, involuntary medication of the defendant will render the defendant competent to stand trial, (B) an adjudication of guilt or innocence cannot be had using less intrusive means, (C) the proposed treatment plan is narrowly tailored to minimize intrusion on the defendant’s liberty and privacy interests, (D) the proposed drug regimen will not cause an unnecessary risk to the defendant’s health, and (E) the seriousness of the alleged crime is such that the criminal law enforcement interest of the state in fairly and accurately determining the defendant’s guilt or innocence overrides the defendant’s interest in self-determination.

(3) (A) If the court finds that the defendant is unwilling or unable to provide consent for the administration of psychiatric medication, and prior to deciding whether to order the involuntary medication of the defendant under subdivision (2) of this subsection, the court shall appoint a health care guardian who shall be a licensed health care provider with specialized training in the treatment of persons with psychiatric disabilities to represent the health care interests of the defendant before the court. Notwithstanding the provisions of § 52-146e, such health care guardian shall have access to the psychiatric records of the defendant. Such health care guardian shall file a report with the court not later than thirty days after his or her appointment. The report shall set forth such health care guardian’s findings and recommendations concerning the administration of psychiatric medication to the defendant, including the risks and benefits of such medication, the likelihood and seriousness of any adverse side effects and the prognosis with and without such medication. The court shall hold a hearing on the matter not later than ten days after receipt of such health care guardian’s report and shall, in deciding whether to order the involuntary medication of the defendant, take into account such health care guardian’s opinion concerning the health care interests of the defendant.

(B) The court, in anticipation of considering continued involuntary medication of the defendant under subdivision (4) of this subsection, shall order the health care guardian to file a supplemental report updating the findings and recommendations contained in the health care guardian’s report filed under subparagraph (A) of this subdivision.

(4) If, after the defendant has been found to have attained competency by means of involuntary medication ordered under subdivision (2) of this subsection, the court determines by clear and convincing evidence that the defendant will not remain competent absent the continued administration of psychiatric medication for which the defendant is unable to provide consent, and after any hearing held pursuant to subdivision (3) of this subsection and consideration of the supplemental report of the health care guardian, the court may order continued involuntary medication of the defendant if the court finds by clear and convincing evidence that: (A) To a reasonable degree of medical certainty, continued involuntary medication of the defendant will maintain the defendant’s competency to stand trial, (B) an adjudication of guilt or innocence cannot be had using less intrusive means, (C) the proposed treatment plan is narrowly tailored to minimize intrusion on the defendant’s liberty and privacy interests, (D) the proposed drug regimen will not cause an unnecessary risk to the defendant’s health, and (E) the seriousness of the alleged crime is such that the criminal law enforcement interest of the state in fairly and accurately determining the defendant’s guilt or innocence overrides the defendant’s interest in self-determination. Continued involuntary medication ordered under this subdivision may be administered to the defendant while the criminal charges against the defendant are pending and the defendant is in the custody of the Commissioner of Correction or the Commissioner of Mental Health and Addiction Services. An order for continued involuntary medication of the defendant under this subdivision shall be reviewed by the court every one hundred eighty days while such order remains in effect. The court shall order the health care guardian to file a supplemental report for each such review. After any hearing held pursuant to subdivision (3) of this subsection and consideration of the supplemental report of the health care guardian, the court may continue such order if the court finds, by clear and convincing evidence, that the criteria enumerated in subparagraphs (A) to (E), inclusive, of this subdivision are met.

(5) The state shall hold harmless and indemnify any health care guardian appointed by the court pursuant to subdivision (3) of this subsection from financial loss and expense arising out of any claim, demand, suit or judgment by reason of such health care guardian’s alleged negligence or alleged deprivation of any person’s civil rights or other act or omission resulting in damage or injury, provided the health care guardian is found to have been acting in the discharge of his or her duties pursuant to said subdivision and such act or omission is found not to have been wanton, reckless or malicious. The provisions of subsections (b), (c) and (d) of § 5-141d shall apply to such health care guardian. The provisions of chapter 53 shall not apply to a claim against such health care guardian.

(l) Failure of defendant to return to treatment facility in accordance with terms and conditions of release. If a defendant who has been ordered placed for treatment on an inpatient basis at a mental health facility or a facility for persons with intellectual disability is released from such facility on a furlough or for work, therapy or any other reason and fails to return to the facility in accordance with the terms and conditions of the defendant’s release, the person in charge of the facility, or such person’s designee, shall, within twenty-four hours of the defendant’s failure to return, report such failure to the prosecuting authority for the court location which ordered the placement of the defendant. Upon receipt of such a report, the prosecuting authority shall, within available resources, make reasonable efforts to notify any victim or victims of the crime for which the defendant is charged of such defendant’s failure to return to the facility. No civil liability shall be incurred by the state or the prosecuting authority for failure to notify any victim or victims in accordance with this subsection. The failure of a defendant to return to the facility in which the defendant has been placed may constitute sufficient cause for the defendant’s rearrest upon order by the court.

(m) Release or placement of defendant who will not attain competency. Report to court prior to release from placement. (1) If at any time the court determines that there is not a substantial probability that the defendant will attain competency within the period of treatment allowed by this section, or if at the end of such period the court finds that the defendant is still not competent, the court shall consider any recommendation made by the examiners pursuant to subsection (d) of this section and any opinion submitted by the treatment facility pursuant to subparagraph (C) of subsection (j) of this section regarding eligibility for, and the appropriateness of, civil commitment to a hospital for psychiatric disabilities and shall either release the defendant from custody or order the defendant placed in the custody of the Commissioner of Mental Health and Addiction Services, the Commissioner of Children and Families or the Commissioner of Developmental Services. If the court orders the defendant placed in the custody of the Commissioner of Children and Families or the Commissioner of Developmental Services, the commissioner given custody, or the commissioner’s designee, shall then apply for civil commitment in accordance with sections 17a-75 to 17a-83, inclusive, or 17a-270 to 17a-282, inclusive. If the court orders the defendant placed in the custody of the Commissioner of Mental Health and Addiction Services, the court may order the commissioner, or the commissioner’s designee, to apply for civil commitment in accordance with sections 17a-495 to 17a-528, inclusive, or order the commissioner, or the commissioner’s designee, to provide services to the defendant in a less restrictive setting, provided the examiners have determined in the written report filed pursuant to subsection (d) of this section or have testified pursuant to subsection (e) of this section that such services are available and appropriate. If the court orders the defendant placed in the custody of the Commissioner of Mental Health and Addiction Services and orders the commissioner to apply for civil commitment pursuant to this subsection, the court may order the commissioner to give the court notice when the defendant is released from the commissioner’s custody if such release is prior to the expiration of the time within which the defendant may be prosecuted for the crime with which the defendant is charged, provided such order indicates when such time expires. If the court orders the defendant placed in the custody of the Commissioner of Developmental Services for purposes of commitment under any provision of sections 17a-270 to 17a-282, inclusive, the court may order the Commissioner of Developmental Services to give the court notice when the defendant’s commitment is terminated if such termination is prior to the expiration of the time within which the defendant may be prosecuted for the crime with which the defendant is charged, provided such order indicates when such time expires.

(2) The court shall hear arguments as to whether the defendant should be released or should be placed in the custody of the Commissioner of Mental Health and Addiction Services, the Commissioner of Children and Families or the Commissioner of Developmental Services.

(3) If the court orders the release of a defendant charged with the commission of a crime that resulted in the death or serious physical injury, as defined in § 53a-3, of another person, or with a violation of § 53a-70b of the general statutes, revision of 1958, revised to January 1, 2019, or subdivision (2) of subsection (a) of § 53-21, subdivision (2) of subsection (a) of § 53a-60 or § 53a-60a, 53a-70, 53a-70a, 53a-71, 53a-72a or 53a-72b, or orders the placement of such defendant in the custody of the Commissioner of Mental Health and Addiction Services or the Commissioner of Developmental Services, the court may, on its own motion or on motion of the prosecuting authority, order, as a condition of such release or placement, periodic examinations of the defendant as to the defendant’s competency at intervals of not less than six months. If, at any time after the initial periodic examination, the court finds again, based upon an examiner’s recommendation, that there is a substantial probability that the defendant, if provided with a course of treatment, will never regain competency, then any subsequent periodic examination of the defendant as to the defendant’s competency shall be at intervals of not less than eighteen months. Such an examination shall be conducted in accordance with subsection (d) of this section. Periodic examinations ordered by the court under this subsection shall continue until the court finds that the defendant has attained competency or until the time within which the defendant may be prosecuted for the crime with which the defendant is charged, as provided in § 54-193, has expired, whichever occurs first.

(4) Upon receipt of the written report as provided in subsection (d) of this section, the court shall, upon the request of either party filed not later than thirty days after the court receives such report, conduct a hearing as provided in subsection (e) of this section. Such hearing shall be held not later than ninety days after the court receives such report. If the court finds that the defendant has attained competency, the defendant shall be returned to the custody of the Commissioner of Correction or released, if the defendant has met the conditions for release, and the court shall continue with the criminal proceedings.

(5) The court shall dismiss, with or without prejudice, any charges for which a nolle prosequi is not entered when the time within which the defendant may be prosecuted for the crime with which the defendant is charged, as provided in § 54-193, has expired. Notwithstanding the record erasure provisions of § 54-142a, police and court records and records of any state’s attorney pertaining to a charge which is nolled or dismissed without prejudice while the defendant is not competent shall not be erased until the time for the prosecution of the defendant expires under § 54-193. A defendant who is not civilly committed as a result of an application made by the Commissioner of Mental Health and Addiction Services, the Commissioner of Children and Families or the Commissioner of Developmental Services pursuant to this section shall be released. A defendant who is civilly committed pursuant to such an application shall be treated in the same manner as any other civilly committed person.

(n) Payment of costs. The cost of the examination effected by the Commissioner of Mental Health and Addiction Services and of testimony of persons conducting the examination effected by the commissioner shall be paid by the Department of Mental Health and Addiction Services. The cost of the examination and testimony by physicians appointed by the court shall be paid by the Judicial Department. If the defendant is indigent, the fee of the person selected by the defendant to observe the examination and to testify on the defendant’s behalf shall be paid by the Public Defender Services Commission. The expense of treating a defendant placed in the custody of the Commissioner of Mental Health and Addiction Services, the Commissioner of Children and Families or the Commissioner of Developmental Services pursuant to subdivision (2) of subsection (h) of this section or subsection (i) of this section shall be computed and paid for in the same manner as is provided for persons committed by a probate court under the provisions of sections 17b-122, 17b-124 to 17b-132, inclusive, 17b-136 to 17b-138, inclusive, 17b-194 to 17b-197, inclusive, 17b-222 to 17b-250, inclusive, 17b-263, 17b-340 to 17b-350, inclusive, 17b-689b and 17b-743 to 17b-747, inclusive.

(o) Custody of defendant prior to hearing. Until the hearing is held, the defendant, if not released on a promise to appear, conditions of release, cash bail or bond, shall remain in the custody of the Commissioner of Correction unless hospitalized as provided in sections 17a-512 to 17a-517, inclusive.

(p) Placement of defendant who presents significant security, safety or medical risk. Defendant remaining in custody of Commissioner of Correction. (1) This section shall not be construed to require the Commissioner of Mental Health and Addiction Services to place any defendant who presents a significant security, safety or medical risk in a hospital for psychiatric disabilities which does not have the trained staff, facilities or security to accommodate such a person, as determined by the Commissioner of Mental Health and Addiction Services in consultation with the Commissioner of Correction.

(2) If a defendant is placed for treatment with the Commissioner of Mental Health and Addiction Services pursuant to subsection (i) of this section and such defendant is not placed in a hospital for psychiatric disabilities pursuant to a determination made by the Commissioner of Mental Health and Addiction Services under subdivision (1) of this subsection, the defendant shall remain in the custody of the Commissioner of Correction. The Commissioner of Correction shall be responsible for the medical and psychiatric care of the defendant, and the Commissioner of Mental Health and Addiction Services shall remain responsible to provide other appropriate services to restore competency.

(3) If a defendant remains in the custody of the Commissioner of Correction pursuant to subdivision (2) of this subsection and the court finds that the defendant is still not competent and will not attain competency within the remainder of the period covered by the placement order absent administration of psychiatric medication for which the defendant is unwilling or unable to provide consent, the court shall proceed as provided in subdivisions (2), (3) and (4) of subsection (k) of this section. Nothing in this subdivision shall prevent the court from making any other finding or order set forth in subsection (k) of this section.

(q) Defense of defendant prior to trial. This section shall not prevent counsel for the defendant from raising, prior to trial and while the defendant is not competent, any issue susceptible of fair determination.

(r) Credit for time in confinement on inpatient basis. Actual time spent in confinement on an inpatient basis pursuant to this section shall be credited against any sentence imposed on the defendant in the pending criminal case or in any other case arising out of the same conduct in the same manner as time is credited for time spent in a correctional facility awaiting trial.