Introduction

Diabetes affects around 529 million adults worldwide, directly resulting in 1.7 million deaths in 20211. The mortality risk in diabetic adults was ~60% higher than that in the non-diabetic2. Physical activity (PA) has been reported as an indispensable factor in lowering or even canceling out this excess mortality risk. However, more physical inactivity was observed in diabetic adults [Diabetes (U.S. Centers for Diseases Control and Prevention); https://www.cdc.gov/diabetes/index.html]3, partly because they may face more physiological and psychological barriers to PA4,5. Their complicated conditions may also bias the benefit from PA6. Investigating the association between PA and mortality specifically in diabetic adults is vital to inform PA recommendations tailored to this high-risk population. A meta-analysis of 12 cohorts has indicated that the all-cause mortality risk in the highest PA category was 40% lower than that in the lowest among diabetic adults, but the exact volume of PA cannot be specified because its grouping rules are highly heterogeneous across cohorts7. Moreover, some prospective cohort studies reported that ≥150 min/week of moderate-to-vigorous-intensity PA (MVPA) or ≥75 min/week of vigorous-intensity PA (VPA) was associated with 14%–37% lower risks of all-cause mortality in diabetic adults8,9,10. However, all abovementioned studies are based on self-reported PA, which is prone to recall bias and insensitiveness in capturing light-intensity PA (LPA) and is usually restricted to limited PA domains11. In contrast, accelerometer is a promising wearable device that can objectively record an individual’s intensity and duration of PA in free-living conditions for a period of time12,13. It may help uncover the true magnitude of the association between PA and mortality and facilitate personalized T2D management13. A harmonized meta-analysis of eight studies found that in the general population the maximal risk reduction in all-cause mortality for accelerometer-measured MVPA (about 60%) was about twice the magnitude as reported in studies relying on self-reported PA14. In addition, existing studies have demonstrated that objectively measured PA could be a potential predicator for cardiovascular disease (CVD) mortality and cancer mortality in the general population15,16. Nevertheless, accelerometry-based evidence in diabetic adults was scant. Two studies derived from the NHANES, a study from the Look AHEAD Trial and a study from the Walking Away from Type 2 Diabetes trial all demonstrated significant risk reductions in related to all-cause mortality with higher volumes of PA17,18,19,20. However, the sample sizes of these accelerometry-based research among type 2 diabetes (T2D) adults were <2000; accelerometers were worn on the hip or waist, which may omit activities that primarily involve upper body movement; and dose–response analyses were not performed. To fill the knowledge gaps, we aimed to investigate the dose–response associations between the duration of PA in different intensities and risks of all-cause, cancer, and CVD mortality among adults with T2D (96% of all diabetes cases1) in the UK Biobank, the largest prospective cohort with PA measured by wrist-worn accelerometers to date (Fig. 1). Furthermore, we investigated the potential effect modification by factors related to diabetes severity, such as glycemic control, diabetes duration, and diabetes medication use.

Fig. 1: Summary of the study.
figure 1

The study includes 19,624 participants with type 2 diabetes from the UK Biobank to explore the association between accelerometer-derived physical activity and all-cause and cause-specific mortality. The top three boxes present the main findings, the study design, and the baseline characteristics of the population of this study. Below them, we assessed the exposure and the outcome variables in this study. The physical activity data in this study were obtained from accelerometer measurements and classified into four intensities. The outcomes of interest were all-cause mortality, cancer-cause mortality, and cardiovascular-cause mortality. The number of cases for each outcome is provided. Bottom left, restricted cubic splines fitted in the Cox models were used to examine the dose–response associations of physical activity with all-cause and cause-specific mortality. Bold lines represent HRs, while shaded areas indicate 95% CI. Bottom right, we estimated the population-attributable fractions for all-cause mortality. Bottom middle presents the main results of the study. The widths of the lines extending from the center points represent 95% CI. HR hazard ratio; CI confidence interval; PA physical activity; LPA light-intensity physical activity; MPA moderate-intensity physical activity; VPA vigorous-intensity physical activity; MVPA moderate-to-vigorous-intensity physical activity; T2D type 2 diabetes; CVD cardiovascular disease; PAFs population-attributable fractions.

Results

Population characteristics

As shown in Supplementary Fig. 1, of the 502,401 UK Biobank participants, 118,381 had T2D at baseline, of whom 22,309 had accelerometry data. After excluding those who had insufficient wear time (n = 1538), daylight saving time shifts during wear period (n = 909), and missing information on covariates (n = 238), 19,624 participants with T2D were left in the main analysis, with a mean age of 62.3 years (standard deviation, 7.8 years) and 44.4% were males. Diabetic participants included in the analyses were generally healthier than those who were excluded, with a higher level of education, a smaller body mass index (BMI) and waist circumference, a lower prevalence of smoking, and better health status at baseline (Supplementary Table 1). Similarly positive trends were seen in the included diabetic participants with higher volumes of PA (Table 1 and Supplementary Tables 24).

Table 1 Baseline characteristics of 19,624 participants by MVPA

Association of physical activity with all-cause mortality

During a median follow-up of 6.9 years (interquartile range 6.4–7.4 years), 810 death cases were documented. Regardless of PA intensity, the dose–response associations of PA duration with all-cause mortality were L-shaped (p value for non-linearity <0.001, Fig. 2). At the inflection points, associations were observed with all-cause mortality reductions of ~60% at 1800 min/week for LPA, 70% at 400 min/week for moderate-intensity PA (MPA), 45% at 20 min/week for VPA, and 70% at 400 min/week for MVPA, compared with the least active one percentile. Additional associations of all-cause mortality risk reductions followed by a longer duration of PA were limited for LPA (additional 5% by as long as 3000 min/week) but significant for MPA (20% by 1200 min/week), VPA (40% by 200 min/week), and MVPA (20% by 1200 min/week). Accordingly, when the duration of PA was classified into four levels, the risk for all-cause mortality gradually decreased as the duration increased to a higher level, irrespective of PA intensity (p value for trend <0.001, Table 2 and Fig. 3). For example, compared with <150 min/week of MPA, the multivariable-adjusted hazard ratios (HRs) and 95% confidence intervals (CIs) for 150–299, 300–449, and ≥450 min/week were 0.57 (0.47–0.70), 0.42 (0.34–0.53), and 0.32 (0.25–0.40), respectively.

Fig. 2: Dose–response association between accelerometer-derived physical activity and all-cause and cause-specific mortality among participants with type 2 diabetes.
figure 2

ad The gray density histograms depict the distribution of LPA, MPA, VPA, and MVPA, respectively. The data depicted in the box and whisker plots span from the minimum to the maximum values (min/week). The lower and upper boundaries of the box correspond to the 25th and 75th percentiles, respectively, and the central vertical lines within the boxes represent the median values. eh Dose–response association of LPA, MPA, VPA, and MVPA with all-cause mortality. Bold lines represent HRs, while shaded areas indicate 95% CI. il Dose–response association of LPA, MPA, VPA, and MVPA with cancer mortality. Bold lines represent HRs, while shaded areas indicate 95% CI. mp Dose–response association of LPA, MPA, VPA, and MVPA with CVD mortality. Bold lines represent HRs, while shaded areas indicate 95% CI. All adjusted for age (years), sex (male or female), ethnicity (white or others), education (college/university or others), season at the time of accelerometry recording (spring, summer, autumn, or winter), accelerometer wear duration (days), smoking status (never, former, or current), alcohol intake (g/day), diet score (0–7), sleep score (0–5), body mass index (kg/m2), waist circumference (cm), self-rated health (excellent, good, fair, or poor), long-standing illness, disability or infirmity (yes or no), illness, injury, bereavement, or stress in last 2 years (yes or no), history of cancer or cardiovascular disease (yes or no), history of hypertension (yes or no), and diabetes duration (years). Wald tests were used in the analyses to obtain the two-sided p values. HR hazard ratio, CI confidence interval, LPA light-intensity physical activity, MPA moderate-intensity physical activity, VPA vigorous-intensity physical activity, MVPA moderate-to-vigorous-intensity physical activity. Source data are provided as a Source Data file.

Table 2 Hazard ratios (95% CI) for all-cause mortality according to physical activity among individuals with type 2 diabetes
Fig. 3: Association between accelerometer-derived physical activity and all-cause and cause-specific mortality among participants with type 2 diabetes.
figure 3

We utilized diabetic participants (n = 19,624) from the UK Biobank with valid accelerometer data in the analyses. ad Associations of LPA, MPA, VPA, and MVPA with all-cause mortality. eh Associations of LPA, MPA, VPA, and MVPA with cancer mortality. il Associations of LPA, MPA, VPA, and MVPA with CVD mortality. All analyses were adjusted for age (years), sex (male or female), ethnicity (white or others), education (college/university or others), season at the time of accelerometry recording (spring, summer, autumn, or winter), accelerometer wear duration (days), smoking status (never, former, or current), alcohol intake (g/day), diet score (0–7), sleep score (0–5), body mass index (kg/m2), waist circumference (cm), self-rated health (excellent, good, fair, or poor), long-standing illness, disability or infirmity (yes or no), illness, injury, bereavement, or stress in last 2 years (yes or no), history of cancer or cardiovascular disease (yes or no), history of hypertension (yes or no), and diabetes duration (years). Data are presented as HR ± 95% CI for Cox regression. Error bars represent the 95% CIs for each effect estimate. Arrows indicate that the CI are outside the range shown in the figure. Source data are provided as a Source Data file. HR hazard ratio, CI confidence interval, LPA light-intensity physical activity, MPA moderate-intensity physical activity, VPA vigorous-intensity physical activity, MVPA moderate-to-vigorous-intensity physical activity.

The shorter the current PA duration, the higher the proportions of death cases that could be prevented if replaced with the highest level of PA duration (Fig. 4 and Supplementary Table 5). For example, the population-attributable fractions (PAFs) for mortality sequentially decreased with higher durations of MVPA, with PAFs of 28.9%, 6.3%, and 3.4% for those engaging <275 min/week, 275–450 min/week, and 450–624 min/week, respectively. Similar patterns to MVPA were observed for other PA intensities, with 12.7%, 15.8%, and 22.3% of PAFs for the lowest activity groups of LPA, MPA, and VPA, respectively.

Fig. 4: Population-attributable fractions for all-cause mortality associated with accelerometer-derived physical activity among participants with type 2 diabetes.
figure 4

We utilized diabetic participants (n = 19,624) from the UK Biobank with valid accelerometer data in the analyses. Population-attributable fractions below 0 were truncated at 0. LPA light-intensity physical activity, MPA moderate-intensity physical activity, VPA vigorous-intensity physical activity, MVPA moderate-to-vigorous-intensity physical activity. The widths of the lines extending from the center points represent 95% CI. Source data are provided as a Source Data file.

Association of physical activity with cause-specific mortality

A total of 441 cancer deaths (54.4% of all deaths) and 172 CVD deaths (21.2% of all deaths) were recorded. Irrespective of PA intensity, L-shaped associations with PA duration were found for cancer mortality whereas negative linear associations were observed for CVD mortality (Fig. 2). Generally, more risk reductions were associated with higher levels of PA (Fig. 3, Supplementary Tables 6, 7). Compared with <150 min/week of MPA, ≥450 min/week of MPA was associated with a 56% (95% CI: 39%–69%) and 55% (95% CI: 23%–72%) lower risk of cancer and CVD mortality, respectively. Meanwhile, the HRs with VPA ≥ 30 min/week were 0.58 (95% CI: 0.42–0.81) for cancer mortality, and 0.28 (95% CI: 0.14–0.55) for CVD-cause mortality, compared with none of VPA.

Joint association between physical activity and mortality

The risk matrix illustrating the joint associations between combinations of PA with different intensities and mortality was shown in Fig. 5 based on HRs from Supplementary Tables 810. We found that almost all combinations of PA were associated with lower risks of all-cause and cause-specific mortality. Different combinations of PA could associate with similar risk reductions in all-cause mortality, such as 150–299 min/week of MPA and 2100–2449 min/week of LPA (HR = 0.50; 95% CI: 0.35–0.72), 1–14 min/week of VPA and ≥2450 min/week of LPA (HR = 0.52; 95% CI: 0.36–0.76), 1–14 min/week of VPA and 150–299 min/week of MPA (HR = 0.50; 95% CI: 0.38–0.65).

Fig. 5: The risk matrix for the joint association of accelerometer-derived physical activity with all-cause and cause-specific mortality among participants with type 2 diabetes.
figure 5

a The joint associations of LPA and MPA with all-cause mortality. b The joint associations of LPA and VPA with all-cause mortality. c The joint associations of MPA and VPA with all-cause mortality. d The joint associations of LPA and MPA with cancer mortality. e The joint associations of LPA and VPA with cancer mortality. f The joint associations of MPA and VPA with cancer mortality. g The joint associations of LPA and MPA with CVD mortality. h The joint associations of LPA and VPA with CVD mortality. i The joint associations of MPA and VPA with CVD mortality. All analyses were adjusted for age (years), sex (male or female), ethnicity (white or others), education (college/university or others), season at the time of accelerometry recording (spring, summer, autumn, or winter), accelerometer wear duration (days), smoking status (never, former, or current), alcohol intake (g/day), diet score (0–7), sleep score (0–5), body mass index (kg/m2), waist circumference (cm), self-rated health (excellent, good, fair, or poor), long-standing illness, disability or infirmity (yes or no), illness, injury, bereavement, or stress in last 2 years (yes or no), history of cancer or cardiovascular disease (yes or no), history of hypertension (yes or no), and diabetes duration (years). The numbers presented are the associated reduction in hazard (percentage) compared to the least active group, with a redder color indicating a lower risk reduction and a bluer color representing a higher risk reduction. There was not a sufficient number of participants to estimate hazard ratios in the blanked cells. Source data are provided as a Source Data file. LPA light-intensity physical activity, MPA moderate-intensity physical activity, and VPA vigorous-intensity physical activity.

Stratified analyses and sensitivity analyses

No statistically significant interactions were found between all PA intensities and age, BMI, waist circumference, smoking status, alcohol intake, diet scores, sleep scores, and history of hypertension, except sex. (p value for interaction >0.05, Supplementary Tables 1114). The association between LPA and all-cause mortality was stronger among female than male (p value for interaction = 0.031). The results were largely consistent with the main analyses when participants with poor self-rated health status were excluded (Supplementary Table 15), when further adjusted for or stratified by diabetes severity factors (Supplementary Tables 16, 17), when we additionally adjusted for T2D-related complications (Supplementary Table 18), when LPA, MPA, and VPA were mutually adjusted in models (Supplementary Table 19 and Supplementary Fig. 2), when missing data were imputed by chained equations (Supplementary Table 20), when the competing risk regression model was used (Supplementary Table 21), when the volume of PA was expressed in metabolic of equivalent task (MET) (Supplementary Table 22 and Supplementary Fig. 3), and when participants were grouped as those who meet the current guideline PA recommendations and those who did not (Supplementary Table 23). The associations were slightly attenuated in some categories when we excluded participants who had cancer or CVD at baseline (Supplementary Table 24), when we excluded participants who died during the first 2 and 4 years of follow-up (Supplementary Table 25), or when cancer deaths were stratified into T2D/obesity-related cancers or -independent cancers (Supplementary Table 26).

Discussion

In this prospective cohort study of 19,624 adults with T2D, we found that irrespective of PA intensity, longer duration of accelerometer-measured PA was significantly associated with a lower risk of all-cause, cancer, and CVD mortality, without minimal or maximal threshold. Up to 38.6% deaths among T2D patients could potentially be associated with performing <625 min/week of MVPA. The associations were independent of many potential confounders, including those related to diabetes severity.

Prior accelerometry-based studies specific to T2D patients were scant but all demonstrated significant risk reductions in mortality-related outcomes with higher volumes of PA, such as a 29% lower risk of premature all-cause mortality for every 60-min increase in daily ambulatory movement in the NHANES and a 2.6% lower risk of a composite CVD outcome including all-cause mortality for every 100 MET-min/week increase in MVPA from baseline to 4 years in the Look AHEAD Trial17,18,19. However, the magnitude of these associations cannot be directly compared with ours because the outcomes were slightly different and the NHANES did not account for PA intensity. In contrast, there have been many relevant studies using self-reported PA. Our accelerometry-based results reinforced the non-linear inverse association between PA and mortality risk in T2D patients observed in these studies, but with larger effect sizes. In our study, a 70% of risk reduction in all-cause mortality was seen at the inflection point of MVPA (400 min/week), larger than the 55% at 500 min/week by self-report in a US study of 41,726 participants diabetic adults21. Moreover, we found that every 600 MET-min/week increase of accelerometer-measured PA was associated with 8% lower risk of all-cause mortality in patients with T2D, much larger than 4% as reported by a meta-analysis of six prospective cohort studies (N = 32,221)22. Similarly, 51% or 48% risk reduction of all-cause mortality was associated with ≥150 min/week of MPA or ≥75 min/week of VPA in our study, much larger than 14% from another study using self-reported PA in the UK Biobank9. The between-study difference might be attributed to the different background of the study populations and the different measurement methods of PA. Accelerometry represents an improvement over self-report by reducing recall bias, misclassification of intensity, omission of fragmented PA, and insensitiveness in capturing LPA.

The L-shaped dose–response associations of accelerometer-measured LPA and MVPA with all-cause mortality in T2D patients in our study mirrored those in the general population in a harmonized meta-analysis, with similar inflection points for LPA (around 2000 min/week) but different ones for MVPA (T2D: 400 min/week; general: 140 min/week)14. The magnitude of risk reduction was smaller in T2D patients than in the general from 1400 min/week to 2100 min/week of LPA (33% vs. 50%) and from around 0 to 140 min/week of MVPA (50% vs. 60%), but beyond this level, the risk continued to decrease in T2D patients while levelled off or even slightly increased in the general. Such discrepancy suggests a longer duration of PA to achieve the same amount of risk reduction in mortality but a larger maximal risk reduction in T2D patients and indicates the necessity of PA recommendations tailored for T2D patients.

The latest guideline recommends ≥150 min/week of MPA to most T2D patients or ≥75 min/week of VPA to patients who are younger and more physically fit23. These recommendations were primarily made based on evidence from self-reported PA, which may be optimized by incorporating evidence from accelerometer-measured PA. In our study, the risk for all-cause mortality decreased sharply as the duration of MPA increased to 400 min/week and then became steady till around 600 min/week before another drop began. A dramatic risk reduction was also seen in VPA till 20 min/week, with a less drastic magnitude thereafter. This finding suggests that the effort required to increase the volume of MPA may not be proportional to the benefit after reaching 400 min/week, while the recommended threshold of VPA can be lowered to 20 min/week, which can bring considerable benefit and is easier to implement.

Despite the fact that regular PA is a recognized modifiable protective factor for T2D prognosis, accelerometry data in 871 T2D patients showed that 55.8%, 57.4%, and 34.9% of White, African American, and Hispanic individuals did not meet the recommended threshold in guidelines24. In line with the statement of the World Health Organization that “every step count”, we found that any amount of PA, even in light intensity, was associated with lower mortality risks versus none among T2D patients. For the least active individuals or those who cannot bear MVPA, starting with small volumes of low-intensity PA may be more feasible and easier to stick with. Another noteworthy point is that as short as 15 min/week of VPA have been linked to a 40% lower risk of mortality that needs to be achieved by 160 min/week of MPA. This short-duration-large-benefit activity is worth trying but some T2D patients may need to consult with health professionals before performing VPA since VPA may be difficult for some people to adopt and maintain or even cause discomfort for older, less fit patients with T2D25. Consultation with health professionals prior to performing VPA may be appropriate. For T2D patients who have just reached the threshold of the guideline, more PA is encouraged to obtain more survival benefit, as long as their functional ability allows. The risk matrix in Fig. 5 can be used as a reference when T2D patients want to choose a combination of PA with different intensities based on their own ability and interest.

The underlying biological mechanisms for the association between PA and mortality reduction in T2D patients can be summarized as PA-induced improvement on insulin sensitivity, glycose control, lipoprotein profile, blood pressure, and blood coagulability, which are likely to reduce the risk of diabetic complications and CVD26. In addition, a marked increase in cytokines, such as interleukin-6 and interleukin-10, provoked by PA can protect against chronic inflammation in T2D27.

The major strengths of this study were its large-scale sample size and rich data sources that enabled us to accurately identify patients with T2D. Furthermore, PA was objectively measured by an accelerometer which can capture leisure and non-leisure PA across multiple domains28 and minimized the recall bias and reporting bias. However, there are several limitations that still need to be considered. First, there is currently a lack of robust evidence on whether a 7-day measurement is representative of habitual PA. A previous validation study showed a 7-day measurement was strongly associated with PA over a period of up to 3.7 years29. If the measurement error is random, the true association between PA and mortality may be underestimated in our study. Second, we utilized wrist-worn accelerometers that are more accurate in discriminating different intensities compared to waist-worn accelerometers30. However, they may not fully capture activities involving minimal arm movement, such as cycling, that ankle-worn accelerometers can quantify more accurately. Third, we only focused on the duration and intensity of PA, but the other properties of PA, such as fragmentation metrics, diurnal pattern, and distributional pattern may be equally important, which warrant further investigation. Fourth, the cut-points for various PA intensities in this study are consistent with most studies involving accelerometry data from the UK Biobank. However, it is important to note that these thresholds, which can be subject to variability due to device and demographic differences, may introduce a degree of subjectivity. Future research should, therefore, utilize more objective methods, such as data-driven approaches based on machine learning, to differentiate between PA intensities. Fifth, as for any observational studies, we cannot exclude the role of residual/unmeasured confounding or make causal conclusions, even though we have adjusted for a wide range of potential confounders. Sixth, PA could be influenced by participants’ health status. Although the results were similar to the main analyses after excluding those with poor self-rated health status and those who died within the first 2 or 4 years of follow-up, the possibility of reverse causation cannot be fully eliminated. Seventh, though the sample size of the UK Biobank was as large as 0.5 million, the response rate was only 5.5% and accelerometer-measured PA was only available for a subset of participants. Diabetic adults in these analyses were generally healthier, more physically active, and had a lower mortality rate than the overall diabetic adults. The selection bias may limit the generalizability of the current findings. Future studies are recommended to verify these associations between PA and mortality in T2D patients across various national populations, with longer follow-up time and larger sample size of diabetic adults. Nonetheless, recent evidence suggests that any potential bias resulting from poor representativeness would have a minimal impact on the association of PA with mortality in the UK Biobank31.

In conclusion, inverse associations previously observed between the duration of self-reported PA and the risk of mortality in individuals with T2D were verified in the UK Biobank using accelerometry data, but with a larger magnitude, which informs an update of the recommended level of MPA and VPA, and an addition of recommendations on LPA in future guidelines.

Methods

Study design and population

The datasets used in this study were obtained from the UK Biobank (Application: 79095), which received approval from the North West Multi-centre Research Ethics Committee (R21/NW/0157), and the Biomedical Research Ethics Committee of Hangzhou Normal University (200400001). All participants gave written informed consent and have signed the informed consent to be linked to national electronic health-related datasets32. The UK Biobank is a large, population-based prospective cohort, in which more than 0.5 million participants aged 37–73 years attended 1 of the 22 assessment centers across England, Scotland, and Wales to complete touchscreen questionnaires, physical examinations, and biological sample collections between 2006 and 2010 (baseline of the UK Biobank). Then between 2013 and 2015 (baseline of this study), 240,000 invitations were randomly sent to them for PA measurement by accelerometers, with a response rate of 44%. Devices were dispatched for 106,053 participants and, of these, data were received from 103,666. In this study, participants with T2D at baseline were identified through an integration of multiple data sources: self-reported T2D, measured random glucose level ≥11.1 mmol/L or glycated hemoglobin (HbA1c) level ≥48 mmol/L according to the American Diabetes Association criteria, and code E11 in the electronic health records (England and Wales: Health Episode Statistics; Scotland: Scottish Morbidity Records) according to the 10th Revision of the International Classification of Diseases (ICD-10). The algorithms for the capture and adjudication of prevalent T2D was consistent with previous research9.

Device-measured physical activity

Participants were asked to wear Axivity AX3 (Newcastle upon Tyne, UK) triaxial accelerometers on their dominant hands for 7 days, when the sensor captured the acceleration at 100 Hz with a dynamic range of ±8 g (unit of gravity)13. Participants with insufficient wear time (<72 h), poor device calibration, or daylight saving time shift during their wear period were excluded in this study. Minutes per week of LPA, MPA, and VPA were determined as the time spent in 30–125 milligravities (mg), >125–400 mg, and >400 mg intensity activity, respectively25. The duration of MVPA was estimated as the sum of MPA and VPA.

Outcomes ascertainment

The primary outcomes of interest in this study were all-cause, cancer, and CVD mortality. Information on the date and cause of death (C00-C97 for cancer and I00-I99 for CVD according to ICD-10) were obtained from death certificates held by the National Health Service (NHS) Information Center (England and Wales) and the NHS Central Register (Scotland). The follow-up time began at the accelerometer completion and ended at the occurrence of death or the end of follow-up (November 12, 2021), whichever came first.

Covariates ascertainment

Covariates were selected based on a prior-defined directed acyclic graph (Supplementary Fig. 3). Our study finally included age (years between birth date and the start of accelerometry), sex (acquired from central registry at recruitment; Field ID: 31), ethnicity, education, smoking status, alcohol intake (product of intake frequency and gram of each type of alcohol per one standard drink)33, diet quality, sleep quality, self-rated health status, history of cancer, CVD, hypertension, long-standing illness, disability, or infirmity, and experience of serious illness, injury, bereavement, stress in last two years derived from the questionnaires, body mass index (BMI, kg/m2, weight in kilograms divided by height in meters squared) and waist circumstance (cm) measured during the initial visit, season and wear duration recorded by the accelerometers, and diabetes duration (years between the first occurrence of diabetes and the start of accelerometry). Diet scores (0–7) were by assigning 1 point for a healthy frequency and 0 point for an unhealthy frequency of consumption of fruits, vegetables, fish, processed meat, unprocessed red meat, whole grains, and refined grains, with higher scores indicating a healthier diet quality34,35. Similarly, sleep scores (0–5) were generated by incorporating five sleep factors: chronotype, sleep duration, insomnia, snoring, and excessive daytime sleepiness, with higher scores indicating better sleep quality36.

Statistical analyses

Baseline characteristics of the participants according to different volumes of PA were described as means and standard deviations (SDs) for continuous variables and numbers (percentages) for categorical variables.

Dose–response associations of PA with all-cause and cause-specific mortality were evaluated using restricted cubic splines fitted in the Cox proportional hazards models (“rms” package in R). The reference values were set at the 1st percentile, and knots at the 5th, 35th, 65th, and 95th percentiles of the PA distribution. Potential non-linearity was tested by Wald tests. Then, the duration of PA was categorized into four levels: <1750, 1750–2099, 2100–2449, and ≥2450 min/week for LPA, <150, 150–299, 300–449, and ≥450 min/week for MPA, 0, 1–14, 15–29, and ≥30 min/week for VPA, and <275, 275–449, 450–624, and ≥625 min/week for MVPA after considering recommendations in the current PA guideline (≥150 min/week of MPA or ≥75 min/week of VPA), the inflection points of the dose–response relationship in this study (about 1750, 400, 15, and 375 min/week for LPA, MPA, VPA, and MVPA), and the sample size of each group. Cox proportional hazard models were performed to estimate the HRs and 95% CIs of all-cause and cause-specific mortality risk. Linear trends were examined by entering the median value of each category of PA as a continuous variable into the models. Three multivariable-adjusted models were constructed to account for potential confounding: model 1 was the crude model that adjusted for age (continuous, in years), sex (male or female), ethnicity (white or others), education (college/university or others), season (spring, summer, autumn, or winter) and duration of the accelerometry (continuous); model 2 was further adjusted for smoking status (never, former, or current), alcohol intake (continuous, in gram/day), diet scores (categories, 0–7), and sleep scores (continuous, 0–5); model 3 was the main model that additionally adjusted for BMI (continuous, in kg/m2), waist circumference (continuous, in cm), self-rated health (excellent, good, fair, or poor), long-standing illness, disability or infirmity (yes or no), illness, injury, bereavement, stress in last 2 years (yes or no), history of cancer or CVD (yes or no), history of hypertension (yes or no), and diabetes duration (continuous, in years). In the primary analyses, age, season at the time of accelerometry recording, and history of cancer or CVD were treated as time-varying covariates by constructing interaction terms between covariates and time. The proportional hazard assumption for Cox models was checked with Schoenfeld residuals and no violation was observed (Supplementary Table 27). Furthermore, a risk matrix was used to investigate the joint associations of different-intensity PA with all-cause and cause-specific mortality. The combination of the least active groups was set as the reference group. The PAFs were calculated to estimate the percentage of all death cases that would be prevented if individuals in the less active group were as active as the most active one37,38. Missing values in covariates with a missing rate <1% (e.g., smoking status and BMI) were completely excluded, while those with a missing rate >1% (e.g., education and diet scores) were coded as an additional category for categorical variables or mean values for continuous variables.

Stratified analyses were conducted according to age (<60 years and ≥60 years), sex (male and female), BMI (<25 kg/m2 and ≥25 kg/m2), waist circumference (<102 cm for male and <88 cm for female, and other), smoking status (never and ever), alcohol intake (<28 g/day for male and <14 g/day for female, and other), diet scores (<4 and ≥4), sleep scores (<3 and ≥3) and history of hypertension (yes and no) to examine whether the associations varied by these factors. Interaction terms were tested by a wald test.

Several sensitivity analyses were carried out to assess the robustness of our results. First, participants with cancer or CVD at baseline were excluded when assessing the association between PA and corresponding cause-specific mortality. Second, participants with poor self-rated health status were excluded, considering that they were more likely to undertake less PA and have higher risks of mortality. Third, we excluded participants who died within the first 2 and 4 years of follow-up to avoid the potential risk of reverse causation. Fourth, we performed stratified analyses by the number of diabetes severity factors, including glycated hemoglobin level (HbA1c) ≥ 7.0%, diabetes duration ≥10 years, and insulin medication use. Fifth, these factors were treated as covariates in the adjusted models. Sixth, T2D-related complications including related eye disease were additionally adjusted in the model. Seventh, LPA, MPA, and VPA variables were mutually adjusted to evaluate whether the associations were attributable to other intensity. Eighth, we stratified the cancer deaths by T2D/Obesity-related cancers and T2D/Obesity-independent cancers. Ninth, we repeated the main analysis after imputing the missing values of the covariates using chained equation multiple imputations (Supplementary eMethods). Tenth, we employed the Fine and Gray sub-distribution hazard model to examine the associations between PA and CVD mortality, accounting for cancer deaths as a competing risk. Similarly, we considered CVD deaths as a competing risk when analyzing the relationship between PA and cancer mortality through competing risk analyses. Finally, total PA in MET-min/week was estimated as the sum of three PA modes (LPA, MPA, and VPA) according to guidelines for data processing of the International Physical Activity Questionnaire39. Additionally, we repeated the analysis in all-cause mortality after stratified the participants into two distinct groups: those who meet the current guideline PA recommendations and those who did not align with the recommendations.

All the analyses were conducted using STATA 16 statistical software (Stata Corp LLP, College Station, TX) and R software (version 4.1.3). The statistical significance was set as P < 0.05 (two-sided test).

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.