Background: War experiences (WE) and postwar environments (PWE) are associated with mental ill-health. The present study aims to investigate the pathways from WE and PWE to mental ill-health and to define opportunities for intervention through analysis of the war-affected youths study (WAYS) cohort study. Method: WAYS is an ongoing study of a large cohort of former child soldiers being conducted in Uganda. Mental health problems, subjective WE and PWE contexts were assessed by local adaptations of internationally developed measures for use with former child soldiers at least 6 years after the end of the war. Structural equation modeling was used to test two mediation hypotheses: (1) the 'trauma model' in which WE directly influence long-term mental health and (2) the 'psychosocial path' in which WE influence long-term mental health through PWE stressors. Results: WE were linked to depression/anxiety (β=0.15 (95% CI 0.01 to 0.30)) through PWE (accounting for 44% of the variance in the relationship between these variables) and to conduct problems (β=0.23 (95% CI 0.03 to 0.43); (accounting for 89% of the variance, ie, near complete mediation)). The direct relation between WE and depression/anxiety attenuated but remained statistically significant. For conduct problems, the direct relationship was no longer significant after accounting for PWE. Conclusions: PWE are a key determinant of continued mental health problems in former child soldiers. Interventions to reduce long-term mental problems should address both PWE stressors (psychosocial model) and specialised mental healthcare (trauma model) and consider both models of intervention as complementary.