Aims: To determine the association between registered mental illness and type 2 diabetes mellitus treatment targets, while taking into account the effects of health expenditure and social... Show moreAims: To determine the association between registered mental illness and type 2 diabetes mellitus treatment targets, while taking into account the effects of health expenditure and social determinants of health. Methods: This observational cross-sectional study was based on routine primary care data, linked to socio-economic and medical claims data. The main outcomes, analysed by multivariate logistic regression, were achieving primary care guideline treatment targets for HbA(1c), systolic blood pressure (SBP) and LDL-cholesterol in 2017. We examined the association with diagnosed mental illness registered by the general practitioner (GP) or treated via specialist' mental healthcare between 2016 and 2018, adjusting for, medication use, body mass index, co-morbidity, smoking, and additionally examining effect-modification of healthcare expenditures, migration status, income and demographics. Results: Overall (N = 2862), 64.0% of participants achieved their treatment targets for HbA(1c), 65.1% for SBP and 53.0% for LDL-cholesterol. Adjusted for migrant background, income and care expenditures, individuals <65 years of age with mental illness achieved their HbA(1c) treatment target more often than those without (OR (95% CI)): treatment by GP: 1.46 (1.01, 2.11), specialist care: 1.61 (1.11, 2.34), as did men with mental illness for SBP: GP OR 1.61 (1.09, 2.40), specialist care OR 1.59 (1.09, 2.45). LDL-cholesterol target was not associated with mental illness. A migrant background or low income lowered the likelihood of reaching HbA(1c) targets. Conclusions: People with registered mental illness appear comparable or better able to achieve diabetes treatment targets than those without. Achieving HbA(1c) targets is influenced by social disadvantage. Show less