Yes, in some situations a person facing criminal charges can go to a mental hospital or into court-supervised mental health treatment instead of jail. The main routes are pretrial diversion programs, competency proceedings, the insanity defense, and treatment ordered as a condition of a sentence. Which one fits depends on the charges, how serious the mental illness is, and when the issue is raised in the case.
The Four Main Pathways
Each route enters the case at a different point. Diversion happens early, often before trial, and reroutes the case into treatment. Competency proceedings pause the case when a defendant can’t meaningfully participate in their own defense, and often send them to a psychiatric facility for treatment aimed at restoring their ability to stand trial. The insanity defense is raised at trial and looks backward at the defendant’s mental state during the offense. Court-ordered treatment as part of a sentence comes at the end, usually attached to probation.
None of these are automatic. Each requires clinical documentation, legal motions, and a judge’s approval. Violent felonies and sex offenses are almost universally disqualifying for the diversion routes, and even where a route is available, the outcome is rarely “walk free.” More often, it’s a different kind of supervision with a treatment focus.
Mental Health Diversion Programs
Diversion programs pull people with mental health conditions out of the criminal track and into community-based treatment. Pre-arrest diversion happens when law enforcement connects someone to a provider instead of making an arrest. Pretrial diversion happens after arrest but before trial, when a court routes the defendant into treatment rather than prosecuting in the usual way.
Eligibility generally requires a diagnosed condition that played a meaningful role in the alleged offense. Bipolar disorder, schizophrenia, schizoaffective disorder, and PTSD commonly qualify. The federal pretrial diversion program gives U.S. Attorneys discretion to prioritize people with mental health challenges, though it excludes several categories of serious offenses, including cases involving firearms, serious bodily injury or death, and leadership roles in violent gangs or large criminal organizations.1U.S. Department of Justice. Justice Manual 9-22.000 – Pretrial Diversion Program State programs have their own exclusion lists.
Once admitted, the defendant agrees to a court-approved treatment plan and typically waives the right to a speedy trial while enrolled. Successful completion can lead to charges being dismissed or reduced, and in some jurisdictions the arrest record sealed. Failing out sends the case back to the standard criminal track.
Mental Health Courts
Mental health courts are a specialized form of diversion, now operating in over 300 programs across nearly every state. They replace standard proceedings with a problem-solving team: the judge, prosecutor, defense attorney, probation staff, and mental health professionals jointly oversee each participant’s treatment.
Structures vary. Some courts set the case aside entirely until completion, leaving no criminal record. Others require a guilty plea up front, with dismissal on graduation. Participants who don’t finish aren’t automatically jailed; outcomes depend on the circumstances and the judge. Evaluations consistently show participants use more mental health services and have fewer jail bookings and police contacts than they otherwise would, even when they don’t complete the program.
Competency to Stand Trial
Competency is a separate legal question from whether someone belongs in treatment instead of jail, but it often leads there. The constitutional standard, from Dusky v. United States, asks whether the defendant has a rational and factual understanding of the proceedings and can consult meaningfully with counsel.2Constitution Annotated. Amdt14.S1.5.5.7 Competency for Trial This is about present mental functioning, not the state of mind at the time of the offense.
The defense attorney, prosecutor, or judge can raise the issue at any point. Once raised, criminal proceedings pause and the court orders a forensic psychiatric evaluation. The evaluator looks at whether the defendant understands the charges, the roles of courtroom participants, the possible penalties, and whether they can help their attorney build a defense.
Restoration in a Psychiatric Facility
A defendant found incompetent is usually committed to a psychiatric facility for treatment aimed at restoring competency. Under federal law, the initial commitment lasts up to four months to determine whether there is a substantial probability the defendant will become competent in the foreseeable future. If so, commitment continues until their condition improves enough for the case to proceed.3Office of the Law Revision Counsel. 18 U.S. Code 4241 – Determination of Mental Competency to Stand Trial State limits vary; some cap restoration at one year or less, and some tie the cap to the maximum sentence for the underlying charge.
Restoration typically combines psychiatric medication, education about the legal process, and therapy aimed at helping the defendant engage with their defense. Most restoration happens at state psychiatric hospitals, and this is where the system often breaks down. Forensic beds are in chronic shortage, and defendants can wait months in jail before a bed opens.
When Competency Cannot Be Restored
Not everyone can be restored. Severe intellectual disabilities, advanced dementia, and treatment-resistant psychotic disorders sometimes make the legal threshold unreachable. In Jackson v. Indiana (1972), the Supreme Court held that a defendant can’t be held indefinitely solely because they are incompetent. The state must either start standard civil commitment proceedings or release the person.4The Journal of the American Academy of Psychiatry and the Law. Incompetent to Stand Trial, Not Restorable, and Dangerous Charges are usually dismissed, sometimes without prejudice, meaning prosecutors could refile if the person’s condition improves.
The Insanity Defense
The insanity defense looks at the defendant’s mental state at the moment of the offense, not now. A successful defense produces a verdict of not guilty by reason of insanity, but that almost never means walking free.
Two tests dominate. The M’Naghten test, older and more widely used, asks whether mental illness prevented the defendant from knowing what they were doing or from knowing it was wrong. The Model Penal Code test is broader, asking whether the defendant lacked substantial capacity to appreciate the wrongfulness of their conduct or to conform to the law. States choose the test they apply, and some have created their own variations.
States That Have Limited or Eliminated the Defense
Five states no longer offer a traditional insanity defense: Kansas, Alaska, Idaho, Montana, and Utah. They still allow evidence of mental illness, but only to show the defendant lacked the intent the crime requires, not to argue they couldn’t tell right from wrong. The Supreme Court upheld this approach in Kahler v. Kansas (2020), holding that the Constitution does not require any particular insanity test.5Supreme Court of the United States. Kahler v. Kansas, No. 18-6135 In those states, the traditional not guilty by reason of insanity verdict isn’t available, though mental illness can still affect the conviction or sentence.
How Often It Works
The insanity defense is far less common than television suggests. An eight-state study found it was raised in roughly 1% of felony cases, and only about 26% of those attempts led to acquittal.6The Bulletin of the American Academy of Psychiatry and the Law. The Volume and Characteristics of Insanity Defense Pleas: An Eight-State Study Juries tend to be skeptical, and prosecutors contest it with their own forensic experts.
What Happens After an Insanity Acquittal
An NGRI verdict leads to commitment in a secure psychiatric facility, not release. The commitment is typically indefinite, lasting until the person can show they are no longer dangerous. Many acquitted defendants spend more time in a psychiatric institution than they would have spent in prison. Release requires a court hearing, and the burden is usually on the committed person to prove they’re safe for discharge.
Guilty but Mentally Ill Is Not a Route to a Hospital
Some states offer a third option, guilty but mentally ill, for defendants who were mentally ill at the time of the offense but don’t meet the legal threshold for insanity. A GBMI verdict carries the same sentence as a straight guilty verdict. Treatment during incarceration is supposed to follow, but research from the National Institute of Justice found that GBMI offenders did not actually receive better access to mental health care than other inmates, and were given stiffer sentences than defendants convicted without the mental illness finding.7National Institute of Justice. Guilty But Mentally Ill Verdict – An Empirical Study Defense attorneys often view GBMI with skepticism because it delivers a full criminal sentence without a real guarantee of treatment.
Treatment as a Condition of Sentencing
Even without diversion or a specialized defense, a judge can build mental health treatment directly into a sentence. Federal law authorizes courts to require psychiatric or psychological treatment as a condition of probation, including inpatient care at a specified facility when necessary.8Office of the Law Revision Counsel. 18 U.S. Code 3563 – Conditions of Probation This is most common for lower-level offenses and for cases where the judge concludes that untreated mental illness drove the conduct.
A probation officer, sometimes one with specialized mental health training, works with treatment providers to oversee participation, adjust the plan, and report to the court.9United States Courts. Chapter 3: Mental Health Treatment – Probation and Supervised Release Conditions Missed appointments, refused medication, or other violations have real consequences. Under federal law, the court can modify probation, extend it, or revoke it entirely and resentence the defendant to prison.10Office of the Law Revision Counsel. 18 U.S. Code 3565 – Revocation of Probation
Who Pays for the Evaluation and Treatment
Cost catches many families off guard. In most cases, the defendant is responsible for paying for court-ordered evaluations and treatment. Forensic psychiatric evaluations typically run from several hundred to over a thousand dollars, and ongoing treatment adds up quickly. Courts do sometimes appoint and pay for evaluators, particularly for indigent defendants, and judges have discretion to arrange financial help. If you can’t afford it, raising the issue early with your attorney gives the court time to explore alternatives.
How to Actually Pursue a Mental Health Alternative
Getting a defense attorney involved early is the single most important step. Most of these pathways require legal motions, clinical documentation, and negotiation with prosecutors, and some windows close quickly. Pretrial diversion generally has to be requested before trial begins or a plea is entered. Competency can be raised at any point, but earlier is better because the evaluation and any restoration process take time.
Documentation matters enormously. A diagnosis from a qualified mental health professional, treatment records showing the history and severity of the condition, and evidence linking the illness to the alleged offense all strengthen a request for diversion or alternative sentencing. If no prior diagnosis exists, the defense attorney can request a forensic evaluation, and courts appoint evaluators at public expense for defendants who can’t afford one.
The insanity defense demands the most preparation and carries the highest stakes. It typically requires a thorough forensic evaluation by an expert willing to testify, and the defendant usually bears the burden of proving insanity. Most defense attorneys won’t pursue it unless the evidence of severe mental illness at the time of the offense is overwhelming, because a failed insanity defense can alienate a jury and produce a worse outcome than a conventional strategy.
For families trying to help a loved one, a criminal defense attorney with experience in mental health cases is the right starting point. Many public defender offices have attorneys or social workers who specialize in these cases. If the person is already in jail and appears to be decompensating, the family can alert the defense attorney, who can file a motion raising competency concerns. Jail medical staff can also flag mental health issues, though relying on that alone is risky given how overstretched most jail mental health services are.