Objective: This study assessed whether practice setting (outpatient primary care or emergency care) influenced whether patients with mental illness received the same quality of diabetes preventive care as patients without mental illness. Methods: Cross-sectional analyses of administrative claims data from 8,817 diabetic patients with (N=908) and without (N=7,909) mental illness seen in either the emergency or the outpatient setting of a safety-net health system were used to examine receipt of diabetes-related preventive care. Outcomes included receipt of dilated eye examinations and testing of high-density lipoprotein (HDL), low-density lipoprotein (LDL), glycosylated hemoglobin (HbA1c), and nephropathy. Results: Receipt of testing for HDL, LDL, and nephropathy were comparable for patients with and without mental illness (overall rates of 36%, 33%, and 34%); however, persons with mental illness were significantly less likely to be tested for HbA1c (48% versus 52%; p=.043) and to have an eye exam (40% versus 45%; p=.006). Patients with mental illness had twice as many visits in the emergency setting (mean number of visits, 7.0 +/- 12.0 versus 2.8 +/- 6.0; p<.001), and all diabetic patients seen only in the emergency setting, regardless of mental illness status, received fewer diabetes preventive services than those who were ever seen in an outpatient setting (p<.001). Conclusions: In this safety-net setting, site of care appeared to be more important than mental illness diagnosis as a determinant of quality of diabetes care. Persons with mental illness may obtain similar potential advantages as those without mental illness from better coordination with outpatient medical care. (Psychiatric Services 61:1204-1210, 2010)