Mental illness in Egypt had undergone significant changes by the end of the nineteenth century. European norms and definitions of mental illness, deriving their origins from the new psychiatry, began to infiltrate the country as an outcome of European intervention. Such norms replaced local norms, leading to a change in the definition of mental illness and the way society viewed and dealt with the mentally ill. In pre-modernist societies, the prevailing outlook on the mentally ill was mainly characterized by tolerance and acceptance, and tended to equate the mentally ill with any other patient who could be cured. Such an outlook changed into a more stringent and isolating one that dealt with the mentally ill cautiously and fearfully and considered them a liability to society that, like any contagious patient, needed to be expelled. Mental asylums in the early and middle Islamic ages were a place for the treatment of the mentally ill, rather than institutions for locking up and isolating them from societies. These asylums were usually built in the heart of the cities to make it easier for relatives to visit their loved ones.