Melton, Presiding Justice.The constitutional issue involved in this case is identical to the one that was presented in, and is resolved by, this Court’s decision in Carr v. State, – Ga. – (Case No S18A0100, decided June 18, 2018). In Carr, this Court sustained a due process challenge to OCGA § 17-7-130 (c), which is a statute that had been applied to require the defendant who had been accused of violent offenses in that case and who had been found to be mentally incompetent to stand trial to be transferred to the physical custody of the Georgia Department of Behavioral Health and Developmental Disabilities (the department) for further evaluation.[1]Specifically, we held that,[b]ecause the nature of automatic commitment [under the portion of OCGA § 17-7-130 (c) applicable to] all those defendants [who had been accused of violent crimes and found to be mentally incompetent to stand trial] does not bear a reasonable relation to the State’s purpose of accurately determining the restorability of individual defendants’ competence to stand trial, that aspect of OCGA § 17-7-130 (c) violates due process when applied to defendants who have been deprived of their liberty based solely on that statutory provision.(Emphasis in original.) Id. slip op. at 32 (5) (b).By way of background, in the instant case, Ryan L. McGouirk was arrested in January 2016 and charged with the violent offenses of aggravated child molestation, child molestation, cruelty to children (for causing pain to a child by having the child touch him sexually), and arson in the first degree. See OCGA § 17-7-130 (a) (11) (A) (ii) and (ix) (The definition of “violent offense” for purposes of proceedings upon a plea of mental incompetence to stand trial includes “[a] sexual offense” or “[a]rson in the first degree or in the second degree.”). McGouirk was subsequently released on bond. Following his indictment, McGouirk filed special pleas of mental incompetence to stand trial. See OCGA § 17-7-130 (b) (2).At a hearing in June 2017, a doctor from the department, Dr. Elizabeth Donegan, testified that she performed a competency evaluation on McGouirk in August 2016. The doctor found that McGouirk was not competent to stand trial[2] and, although she was uncertain he could attain competency, she could provide a better sense of his restorability after providing restoration services. Dr. Donegan found no indications that McGouirk was in need of psychiatric hospitalization for stabilization and recommended that the court consider outpatient commitment for competency restoration. However, because McGouirk had been charged with “violent offenses” as defined by OCGA § 17-7-130, based solely on the provisions of OCGA § 17-7-130 (c) he was to be transferred “to the physical custody of the department.”McGouirk argued that the inpatient requirement under OCGA § 17-7-130 (c) violated his equal protection and due process rights, and he asked that the court order outpatient services. The trial court denied McGouirk’s request and ordered that he be committed to an inpatient facility for competency restoration as soon as the department had an inpatient opening. The trial court granted McGouirk a certificate of immediate review, and he filed an application for interlocutory appeal, which this Court granted.As we determined in Carr, supra, where, as here, McGouirk was released on bond and was found to be mentally incompetent to stand trial, and where he was subjected to automatic commitment to the physical custody of the department pursuant to OCGA § 17-7-130 (c) solely based on the fact that he was a mentally incompetent individual who had been accused of committing violent crimes, OCGA § 17-7-130 (c) was not “applied constitutionally to [McGouirk].” Id. slip op. at 2.[3] In order for the trial court to apply OCGA § 17-7-130 (c) in a constitutional manner to McGouirk, the court must exercise its discretion to make “an individualized determination of whether [McGouirk's] confinement reasonably advances the government’s purpose” (Carr, supra, slip op. at 2) of accurately determining whether “there is a substantial probability that [McGouirk] will attain mental competency to stand trial in the foreseeable future.” OCGA § 17-7-130 (c). Indeed,[r]ather than the particular crime with which [McGouirk] is charged, it is his particular mental condition that affects whether his commitment is reasonably related to the goal of accurately evaluating his likelihood of attaining competence so he can be tried. Only in those cases where detention is in fact reasonably related to this objective does the State’s interest justify depriving the defendant of his strong liberty interest. . . . Neither the crime of which a defendant is accused – a crime of which he must constitutionally be presumed innocent – nor the finding of incompetency to stand trial is itself a sufficient ground to detain a citizen.(Citations omitted; emphasis in original.) Carr, supra, slip op. at 28-29 (5) (a).In order to make its determination,the trial court should proceed as it does in determining how to evaluate mentally incompetent defendants accused of nonviolent offenses. To ensure that the nature of commitment to the department is appropriate for the particular defendant, the court should consider all relevant evidence and make a finding as to whether the evaluation required by OCGA § 17-7-130 (c) should be conducted on an inpatient or outpatient basis. . . . If the court determines that inpatient evaluation is not appropriate for [McGouirk, who is] a mentally incompetent defendant charged with a violent offense and [who is] not already detained for another, lawful reason, then the portion of § 17-7-130 (c) requiring commitment of [McGouirk] to the physical custody of the department cannot be applied as a matter of constitutional due process.Id. slip op. at 32-33 (5) (b).Accordingly,the part of the trial court’s judgment concluding that OCGA § 17-7130 (c) is constitutional is reversed[,] . . . the part of the judgment ordering [McGouirk] to be delivered to the custody of the department for evaluation is vacated[,]. . . [and] the trial court’s unchallenged finding that [McGouirk] is incompetent to stand trial is affirmed. On remand, the trial court should proceed in accordance with this [Court's] opinion [in Carr and our opinion in this case], including exercising discretion in deciding whether [McGouirk] should be committed to the department’s custody for evaluation or should be evaluated on an outpatient basis.(Footnote omitted.) Id. slip op. at 35.Judgment affirmed in part, reversed in part, and vacated in part, and case remanded with direction. All the Justices concur.