In the Islamic world, the Bimaristans were described by European travelers, who wrote on their wonder at the care and kindness shown to lunatics. In 872, Ahmad ibn Tulun built a hospital in Cairo that provided care to the insane. Nonetheless, medical historian Roy Porter cautions against idealising the role of hospitals generally in medieval Islam stating that "They were a drop in the ocean for the vast population that they had to serve, and their true function lay in highlighting ideals of compassion and bringing together the activities of the medical profession."
In Europe during the medieval era, a variety of settings were employed to house the small subsection of the population of the mad who were housed in institutional settings. Porter gives examples of such locales where some of the insane were cared for, such as in monasteries. A few towns had towers where madmen were kept (called Narrentürme or fools' tower). The ancient Parisian hospital Hôtel-Dieu also had a small number of cells set aside for lunatics, whilst the town of Elbing boasted a madhouse,Tollhaus, attached to the Teutonic Knights' hospital. Other such institutions for the insane were established after the Christian Reconquista, including hospitals in Valencia (1407), Zaragoza (1425), Seville (1436), Barcelona (1481), and Toledo (1483). The Priory of Saint Mary of Bethlehem, which later became known more notoriously as Bedlam, was founded in 1247. At the start of the fifteenth century it housed just six insane men. The former lunatic asylum Het Dolhuys from the 16th century in Haarlem, the Netherlands is now a museum of psychiatry with an overview of treatments from the origins of the building up to the 1990s.
In the United States, Virginia is recognized as the first state to establish an institution for the mentally ill. Eastern State Hospital, located in Williamsburg, was founded in 1773. Along with the first institution in America, Virginia also founded the first Colored Asylum in 1870. Their land was given to them by the House of Burgessesin 1769.
Phillipe Pinel (1793) is often credited as being the first in Europe to introduce more humane methods into the treatment of the mentally ill (which came to be known as moral treatment) as the superintendent of the Asylum de Bicêtre in Paris. A hospital employee of Asylum de Bicêtre, Jean-Baptiste Pussin, was actually the first one to remove patient restraints. Pussin influenced Pinel and they both served to spread reforms such as categorising the disorders, as well as observing and talking to patients as methods of cure. Vincenzo Chiarugi in Italy may have banned chains before this time. Johann Jakob Guggenbühl in 1840 started inInterlaken the first retreat for mentally disabled children.
Around the same time as Pussin and Pinel, the Quakers, particularly William Tuke, pioneered an enlightened approach (moral treatment) in England at the York Retreat which opened in 1796. The Retreat was not a psychiatric hospital, and in fact the medical approaches of the day were abandoned in favor of understanding, hope, moral responsibility and occupational therapy. The Brattleboro Retreat and the former Hartford Retreat were named after it.
In 1817, William Ellis was appointed as superintendent to the newly built West Riding Pauper Asylum at Wakefield. As a Methodist, he had strong religious convictions. With his wife as matron, they put into action those things they had learned from the Sculcoates Refuge in Hull which operated on a similar model as the York. After 13 years, as a result of their highly regarded reputation, were invited to oversee the newly built first pauper asylum in Middlesex called the Hanwell Asylum. Accepting the posts, the asylum opened in May 1831. Here the Ellises introduced their own brand of humane treatment and 'moral therapy' combined with 'therapeutic employment.' As its initial capacity was 450 patients, it was already the largest asylum in the country and subject to even more building soon after. Therefore, the immediate and continuing success of humane therapy working on such a large scale encouraged its adoption at other asylums. In recognition of all this work he received a knighthood. He continued to develop therapeutic treatments for mental disorders, always with moral treatment as the guiding principle.
In Lincoln (Lincolnshire, England) Robert Gardiner Hill, with the support of Edward Parker Charlesworth, developed a mode of treatment that suited 'all types' of patients, whereby the reliance on mechanical restraints and coercion could be made obsolete altogether - a situation he finally achieved in 1838.
By the following year of 1839 Sergeant John Adams and Dr. John Conolly were so impressed by the work of Hill, that they immediately introduced the method into their Hanwell Asylum, which was by then the largest in the kingdom. The greater size required Hill's system to be developed and refined. This was necessary as it was beyond Conolly to be able to supervise each attendant as closely as Hill had done. Even so, he bid a pair of extra soft slippers made so that he could walk around the building at night without his foot falls warning the attendants of his imminent approach. By September 1839, mechanical restraint was no longer required for any patient. For years, this day was remembered at the Hanwell asylum by a celebration on its anniversary. Conolly also was a very accomplished communicator who wrote and lectured widely about his work in mental health.  
Reformers, such as American Dorothea Dix began to advocate a more humane and progressive attitude towards the mentally ill. Some were motivated by a Christian duty to mentally ill citizens. In the United States, for example, numerous states established state mental health systems paid for by taxpayer money (and often money from the relatives of those institutionalized inside them). These centralized institutions were often linked with loose governmental bodies, though oversight and quality consequently varied. They were generally geographically isolated as well, located away from urban areas because the land was cheap and there was less political opposition. Many state hospitals in the United States were built in the 1850s and 1860s on the Kirkbride Plan, an architectural style meant to have curative effect. States made large outlays on architecture that often resembled the palaces of Europe, although operating funding for ongoing programs was more scarce. Many patients objected to transfers from private hospitals to state facilities. Some Brattleboro Retreat patients tried to hide when state officials arrived to transfer them to the new Waterbury State Hospital. This decline in patient census led to the collapse of many private institutions, which still accepted indigent patients even when state reimbursement for private hospitals dropped in the face of rising state hospital costs.
In February 1919, the first soviet in the British Isles was established at Monaghan Lunatic Asylum, inMonaghan, Ireland. This led to the claim by Joseph Devlin in the House of Commons that "that the only successfully conducted institutions in Ireland are the lunatic asylums"[