Study objective: Previous research provides preliminary evidence of spatial variations of mental disorders and associations between neighbourhood social context and mental health. This study expands past literature by (1) using spatial techniques, rather than multilevel models, to compare the spatial distributions of two groups of mental disorders (that is, disorders due to psychoactive substance use, and neurotic, stress related, and somatoform disorders); and (2) investigating the independent impact of contextual deprivation and neighbourhood social disorganisation on mental health, while assessing both the magnitude and the spatial scale of these effects. Design: Using different spatial techniques, the study investigated mental disorders due to psychoactive substance use, and neurotic disorders. Participants: All 89 285 persons aged 40-69 years residing in Malmö, Sweden, in 2001, geolocated to their place of residence. Main results: The spatial scan statistic identified a large cluster of increased prevalence in a similar location for the two mental disorders in the northern part of Malmö. However, hierarchical geostatistical models showed that the two groups of disorders exhibited a different spatial distribution, in terms of both magnitude and spatial scale. Mental disorders due to substance consumption showed larger neighbourhood variations, and varied in space on a larger scale, than neurotic disorders. After adjustment for individual factors, the risk of substance related disorders increased with neighbourhood deprivation and neighbourhood social disorganisation. The risk of neurotic disorders only increased with contextual deprivation. Measuring contextual factors across continuous space, it was found that these associations operated on a local scale. Conclusions: Taking space into account in the analyses permitted deeper insight into the contextual determinants of mental disorders.