The worst place to be if you’re suffering from a mental disorder is probably prison. Or even worse — a tiny, cold isolated cell in solitary confinement in said prison.

Jan Green’s story reflects the horrors inmates may go through if they’re suffering from a crippling mental illness like schizophrenia or bipolar disorder, when they’re in a hostile environment that is unequipped to treat them properly, or even provide them with medication. Green, a 51-year-old mother and grandmother, was arrested and charged with two minor incidents of domestic violence in 2009, but remained in jail for nearly two years. Green, who has bipolar disorder, was locked into solitary confinement because she was seen as a threat to the safety of both herself and to other inmates. However, her charges were ultimately dropped, and she has now filed a lawsuit and secured a $1.6 million settlement from the New Mexico county that jailed her.

“The American corrections system is designed to take criminals into jails and prisons and return them back to their communities as a rehabilitated person,” the investigative report by KOB4 that broke the story, stated. “But our 4 On Your Side investigative report shows how the Valencia County Detention Center may actually be putting people back on the streets in a worse condition than when they went in.”

Despite having bipolar disorder, Green had managed to live a normal life, working in computer tech support and raising four children. In 2009, however, her mental health deteriorated and she was accused of hitting her husband with a fan, leading to the domestic violence charges.

Green was kept in a 7-by-8-foot solitary confinement cell for eight months, where she slept on a mat on the floor as food trays piled up. During her menstrual periods, she did not receive sanitary napkins. Her bipolar disorder and overall mental and physical state worsened significantly in confinement. Research has shown the prolonged solitary confinement can exacerbate mental illness, yet prisons often force inmates into isolation in order to deal with difficult or “dangerous” individuals. Isolation is considered a psychological stressor that can “be as clinically distressing as physical torture,” the authors of one study wrote.

Green was likewise never treated by a psychiatrist during her time at the Valencia County Detention Center (VCDC), even though the jail claims they had made “many efforts to convince Ms. Green to accept treatment at the facility.”

After being released from jail, Green was sent to the New Mexico Behavioral Institute where she was described as being “thin,” “unkempt,” and showing signs of psychosis, her complaint reads. Once she began taking medication for her psychosis, her symptoms subsided. “I am not a fan of New Mexico,” Green told Business Insider. “The horrific things that I went through there still haunt me.”

The jail, VCDC, meanwhile, continues to claim that they did not mistreat Green. “Our mistake was the lack of documentation showing that, you know, we actually did provide very good care for her,” Joe Chavez, the jail’s warden, told KOB4.

Green’s lawyer, Matthew Coyte, has seen plenty of cases like Green’s, where inmates with mental disorders are mistreated or handled in a way that actually makes them worse. Indeed, the mental health of prisoners in the U.S. has become a serious issue originally stemming from de-institutionalization in the 1960s. This was the process of shifting patients with mental illness from psychiatric hospitals to community-oriented services or back home, in an attempt to integrate such patients into daily life. However, this also means that many mentally-ill people can fall through the cracks more easily, such as in prison systems. Plenty of organizations are hoping to fight the continued use of solitary confinement in prisons, which they claim costs taxpayers money and also does not do much to rehabilitate prisoners.