['To assess the association of ocular biometric parameters and refractive error with diabetic retinopathy (DR) and diabetic macular edema (DME) in persons with diabetes.', 'Cross-sectional, clinic-based study.', 'Patients with diabetes aged 18 years or more from the Royal Victorian Eye and Ear Hospital, Victoria, Australia.', 'Spherical equivalent (SE) refraction was assessed using objective autorefraction. Axial length (AL), corneal curvature (CC), and anterior chamber depth (ACD) were measured using the IOLMaster (Carl Zeiss Meditech AG, Jena, Germany). Diabetic retinopathy was graded from 2-field retinal photographs using the modified Airlie House classification system. Diabetic macular edema was defined as absent or present from fundus photographs and confirmed by optical coherence tomography (Stratus, Carl Zeiss Meditech AG).', 'Severity of DR was grouped as no DR, mild DR (Early Treatment of Diabetic Retinopathy Study [ETDRS] = 20), moderate DR (ETDRS = 31-43), and severe DR (ETDRS >43). Diabetic macular edema severity was classified as mild, moderate, or severe.', 'A total of 208 of 630 eyes (33.0%) had DR. In multivariate models, eyes with longer AL were less likely to have mild (odds ratio [OR], 0.58; 95% confidence interval [CI], 0.41-0.83; P = 0.006 per mm increase), moderate (OR, 0.73; 95% CI, 0.60-0.88; P = 0.002), and severe DR (OR, 0.67; 95% CI, 0.53-0.85; P=0.01), and had a lesser risk of mild (OR, 0.70; 95% CI, 0.56-0.86; P < 0.001) and moderate DME (OR, 0.72; 95% CI, 0.56-0.93; P=0.002) but not severe DME. No association was found for SE, ACD, and CC with DR.'] Is longer axial length protective of diabetic retinopathy and macular edema?