In the Islamic world, the Bimaristans were described by European travellers, who wrote about 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, which included music therapy. 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.":105
In Europe during the medieval era, the small subsection of the population of those considered mad were housed in institutional settings were held in a variety of 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 in German, or "fools' towers") . 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, the
Tollhaus, attached to the Teutonic Knights' hospital. Dave Sheppard's Development of Mental Health Law and Practice begins in 1285 with a case that linked "the instigation of the devil" with being "frantic and mad".
In Spain, other such institutions for the insane were established after the Christian Reconquista; facilities included hospitals in Valencia (1407), Zaragoza (1425), Seville (1436), Barcelona (1481) and Toledo (1483).:127 In London, England, the Priory of Saint Mary of Bethlehem, which later became known more notoriously as Bedlam, was founded in 1247. At the start of the 15th century, it housed six insane men.:127 The former lunatic asylum, Het Dolhuys, established in the 16th century in Haarlem, the Netherlands, has been adapted as a museum of psychiatry, with an overview of treatments from the origins of the building up to the 1990s.