Background: Universal Credit, a welfare benefit reform in the UK, began to replace six existing benefit schemes in April, 2013, starting with the income-based Job Seekers Allowance. We aimed to determine the effects on mental health of the introduction of Universal Credit. Methods: In this longitudinal controlled study, we linked 197 111 observations from 52 187 individuals of working age (16–64 years) in England, Wales, and Scotland who participated in the Understanding Society UK Longitudinal Household Panel Study between 2009 and 2018 with administrative data on the month when Universal Credit was introduced into the area in which each respondent lived. We included participants who had data on employment status, local authority area of residence, psychological distress, and confounding variables. We excluded individuals from Northern Ireland and people out of work with a disability. We used difference-in-differences analysis of this nationally representative, longitudinal, household survey and separated respondents into two groups: unemployed people who were eligible for Universal Credit (intervention group) and people who were not unemployed and therefore would not have generally been eligible for Universal Credit (comparison group). Using the phased roll-out of Universal Credit, we compared the change in psychological distress (self-reported via General Health Questionnaire-12) between the intervention group and the comparison group over time as the reform was introduced in the area in which each respondent lived. We defined clinically significant psychological distress as a score of greater than 3 on the General Health Questionnaire-12. We tested whether there were differential effects across subgroups (age, sex, and education). Findings: The prevalence of psychological distress increased in the intervention group by 6·57 percentage points (95% CI 1·69–11·42) after the introduction of Universal Credit relative to the comparison group, after accounting for potential confounders. We estimate that between April 29, 2013, and Dec 31, 2018, an additional 63 674 (95% CI 10 042–117 307) unemployed people will have experienced levels of psychological distress that are clinically significant due to the introduction of Universal Credit; 21 760 of these individuals might reach the diagnostic threshold for depression. Interpretation: Our findings suggest that the introduction of Universal Credit led to an increase in psychological distress, a measure of mental health difficulties, among those affected by the policy. Future changes to government welfare systems should be evaluated not only on a fiscal basis but on their potential to affect health and wellbeing. Funding: Wellcome Trust, UK National Institute for Health Research, and Medical Research Council.