BACKGROUND: About 9% of the world's population has diabetes. Most people with diabetes live in developing countries. Diabetes is the fourth leading cause of death in the occupied Palestinian territory. The likelihood of diabetes complications increases with depression. Worldwide, about half of patients with diabetes have severe depression that has been misidentified by health providers. The aim of this study was to examine factors associated with depression in patients with type 2 diabetes in the Gaza governorate. METHODS: This cross-sectional study included patients attending three primary health centres in 2016. A convenient purposive approach to sampling was used to select three centres from the 15 centres in the Gaza governorate, covering the east (border), middle, and west areas. Since 2014, all patients with type 2 diabetes have been screened for depression using the Patient Health Questionnaire 9. Data on demographic, socioeconomic, and health status and on patients' beliefs were collected during interviews with structured questionnaires, and medical data were collected from patient records. χ2 tests and logistic regression were used to test associations between dependent and independent variables. FINDINGS: 380 patients were included in the study. 255 participants were women with type 2 diabetes and older than 40 years. The median age of participants was 59 years (IQR 13). 285 (75%) participants were married, and 221 (58%) had not completed high school. 103 (27%) participants screened positive for depression. Factors positively associated with depression were age (people younger than 50 years were at greater risk than people aged 50 years and older [odds ratio 2·25, 95% CI 1·2-4·2]), being single (2·04, 1·68-3·55), not believing that they can manage the disease (2·9, 1·6-5·6), and living in border areas (3·6, 2·0-6·2). INTERPRETATION: More attention should be given to young, single patients and to those living in border areas. Treatment options and care for patients with depression should be strengthened with counselling and medications. FUNDING: Palestinian National Institute of Public Health.