The association of long-term HbA1c variability with mortality has been previously suggested. However, the significance of HbA1c variability and trends in different age and HbA1c categories is unclear.Data on patients with diabetes listed in the Israeli National Diabetes Registry during years 2012-2016 (observation period) were collected. Patients with4 HbA1c measurements, type 1 diabetes, eGFR 30mg/ml/min, persistent HbA1c 6% or malignancy were excluded. Utilizing machine learning methods, patients were classified into clusters according to their HbA1c trend (increasing, stable, decreasing). Mortality risk during 2017-2019 was calculated in subgroups defined by age (35-54, 55-69, 70-89 years) and last HbA1c (≤7% and7%) at end of observation period. Models were adjusted for demographic, clinical and laboratory measurements including HbA1c, standard deviation (SD) of HbA1c and HbA1c trend.This historical cohort study included 293,314 patients. Increased HbA1c variability (high SD) during the observation period was an independent predictor of mortality in patients aged more than 55 years (p 0.01). The HbA1c trend was another independent predictor of mortality. Patients with a decreasing versus stable HbA1c trend had a greater mortality risk; this association persisted in all age groups in patients with HbA1c 7% at the end of the observation period (p = 0.02 in age 35-54; p 0.01 in aged55). Patients with an increasing versus stable HbA1c trend had a greater mortality risk only in the elderly group (70), yet in both HbA1c categories (p 0.01).HbA1c variability and trend are important determinants of mortality risk and should be considered when adjusting glycaemic targets.