BackgroundRat-borne leptospirosis is an emerging zoonotic disease in urban slum settlements for which there are no adequate control measures. The challenge in elucidating risk factors and informing approaches for prevention is the complex and heterogeneous environment within slums, which vary at fine spatial scales and influence transmission of the bacterial agent.Methodology/Principal FindingsWe performed a prospective study of 2,003 slum residents in the city of Salvador, Brazil during a four-year period (2003–2007) and used a spatiotemporal modelling approach to delineate the dynamics of leptospiral transmission. Household interviews and Geographical Information System surveys were performed annually to evaluate risk exposures and environmental transmission sources. We completed annual serosurveys to ascertain leptospiral infection based on serological evidence. Among the 1,730 (86%) individuals who completed at least one year of follow-up, the infection rate was 35.4 (95% CI, 30.7–40.6) per 1,000 annual follow-up events. Male gender, illiteracy, and age were independently associated with infection risk. Environmental risk factors included rat infestation (OR 1.46, 95% CI, 1.00–2.16), contact with mud (OR 1.57, 95% CI 1.17–2.17) and lower household elevation (OR 0.92 per 10m increase in elevation, 95% CI 0.82–1.04). The spatial distribution of infection risk was highly heterogeneous and varied across small scales. Fixed effects in the spatiotemporal model accounted for the majority of the spatial variation in risk, but there was a significant residual component that was best explained by the spatial random effect. Although infection risk varied between years, the spatial distribution of risk associated with fixed and random effects did not vary temporally. Specific “hot-spots” consistently had higher transmission risk during study years.Conclusions/SignificanceThe risk for leptospiral infection in urban slums is determined in large part by structural features, both social and environmental. Our findings indicate that topographic factors such as household elevation and inadequate drainage increase risk by promoting contact with mud and suggest that the soil-water interface serves as the environmental reservoir for spillover transmission. The use of a spatiotemporal approach allowed the identification of geographic outliers with unexplained risk patterns. This approach, in addition to guiding targeted community-based interventions and identifying new hypotheses, may have general applicability towards addressing environmentally-transmitted diseases that have emerged in complex urban slum settings.