People with type 2 diabetes (T2D), especially uncontrolled T2D, have high risk of cognitive decline. The role of a Mediterranean diet on cognitive function has not been assessed for adults with vs. without T2D within the same population. We aimed to determine associations of a Mediterranean diet score (MeDS) with 2 year changes in cognitive function by T2D status and by glycemic control status. We used data from the Boston Puerto Rican Health Study (mean (SD) age= 57.2 (7.6) y; n=711 without T2D; n=465 with T2D defined as fasting plasma glucose ≥ 126 mg/dL or medication use). Glycemic control at baseline was categorized as uncontrolled (hemoglobin A1c ≥7%; 74% of T2D sample)) vs. controlled (26%). Two-y changes in glycemic control were defined as stable/improved (32%) vs. poor/declined (68%). Baseline MeDS ranged from 0-9 by scoring participants within the sex-specific healthy median intake of 9 foods and nutrients. The primary outcome was 2 year change in global cognitive function z-score, which included 7 cognitive tests. Adjusting for baseline sociodemographic and lifestyle factors, comorbidities, and baseline measure, MeDS was positively associated with 2 year change in global cognitive function in adults with T2D (β ± SE=0.027 ± 0.011; p=0.016) but not without T2D (-0.002 ± 0.008; p=0.80). Similar results were noted for single cognitive tests (i.e., mini-mental state examination, word recognition, digit span, clock drawing). Better global cognitive function over 2 years with higher MeDS was noted with glycemic control at baseline (0.062 ± 0.020; p=0.004) or stable/improved over 2 years (0.053 ± 0.019; p=0.007), but not for uncontrolled or poor/declined glycemic control. Adhering to a Mediterranean diet is associated with positive 2 year changes in cognitive function among adults with T2D. Glycemic control further sustains these benefits, suggesting that both a healthy Mediterranean diet and effective clinical management may help preserve optimal cognitive function in adults with T2D. Disclosure J. Mattei: None. S.J. Bigornia: None. M. Sotos-Prieto: None. T. Scott: None. X. Gao: None. K.L. Tucker: None.