Modern psychiatric hospitals evolved from, and eventually replaced the older lunatic asylums. The development of the modern psychiatric hospital is also the story of the rise of organized, institutional psychiatry.
Hospitals known as bimaristans were built throughout Arab countries beginning around the early 9th century, with the first in Baghdad under the leadership of the Abbasid Caliph Harun al-Rashid. While not devoted solely to patients with psychiatric disorders, they often contained wards for patients exhibiting mania or other psychological distress. Because of cultural taboos against refusing to care for one's family members, mentally ill patients would be surrendered to a bimaristan only if the patient demonstrated violence, incurable chronic illness, or some other extremely debilitating ailment. Psychological wards were typically enclosed by iron bars owing to the aggression of some of the patients.
Western Europe would adopt these views later on with the advances of physicians like Philippe Pinel at the Bicêtre Hospital in France and William Tuke at the York Retreat in England. They advocated the viewing of mental illness as a disorder that required compassionate treatment that would aid in the rehabilitation of the victim. The arrival in the Western world of institutionalisation as a solution to the problem of madness was very much an event of the nineteenth century. The first public mental asylums were established in Britain; the passing of the County Asylums Act 1808 empowered magistrates to build rate-supported asylums in every county to house the many 'pauper lunatics'. Nine counties first applied, the first public asylum opening in 1812 in Nottinghamshire. In 1828, the newly appointed Commissioners in Lunacy were empowered to license and supervise private asylums. The Lunacy Act 1845 made the construction of asylums in every country compulsory with regular inspections on behalf of the Home Secretary. The Act required asylums to have written regulations and to have a resident physician.
At the beginning of the nineteenth century there were a few thousand "sick people" housed in a variety of disparate institutions throughout England, but by 1900 that figure had grown to about 100,000. This growth coincided with the growth of alienism, later known as psychiatry, as a medical specialism. The treatment of inmates in early lunatic asylums was sometimes very brutal and focused on containment and restraint.
In the late 19th and early 20th centuries, terms such as "madness," "lunacy" or "insanity"—all of which assumed a unitary psychosis—were split into numerous "mental diseases," of which catatonia, melancholia and dementia praecox (modern day schizophrenia) were the most common in psychiatric institutions.
In 1961 sociologist Erving Goffman described a theory of the "total institution" and the process by which it takes efforts to maintain predictable and regular behavior on the part of both "guard" and "captor," suggesting that many of the features of such institutions serve the ritual function of ensuring that both classes of people know their function and social role, in other words of "institutionalizing" them. Asylums was a key text in the development of deinstitutionalization.
With successive waves of reform, and the introduction of effective evidence-based treatments, modern psychiatric hospitals provide a primary emphasis on treatment, and attempt where possible to help patients control their own lives in the outside world, with the use of a combination of psychiatric drugs and psychotherapy. These treatments can be involuntary. Involuntary treatments are among the many psychiatric practices which are questioned by the mental patient liberation movement. Most psychiatric hospitals now restrict internet access and any device that can take photos. In the U.S. state of Connecticut, involuntary patients must be examined annually by a court-appointed psychiatrist. Patients may also apply for release at any time and receive a full hearing on the application.