As of 2011, roughly 90 percent of households in India did not own a toilet. As a result, many households practice open defecation behaviours, which impose significant economic burdens on households and communities. While a number of program evaluations have explored the latrine adoption and health impacts of sanitation interventions, there is no research to-date that convincingly studies the long-term impacts of these interventions. In this paper, we provide the first such long-term study of a sanitation campaign. Using panel data on over 1000 households, we analyse the impacts of a randomized community-led total sanitation campaign on latrine adoption and abandonment. We find that adoption in villages receiving the intervention increased for at least five years relative to control villages. We also find that in the long run, households in treatment villages were more likely to abandon latrines. We also exploit the random assignment to study the impact of latrine ownership on long-term cognitive development in children. We find that children that lived in a household with a latrine early in life have significantly higher cognitive skills ten years later, and that this effect is strongest among girls. This may be because the human capital development curve is concave, and girls also receive fewer early-life health investments.