This study examines the association between socioeconomic position (SEP) and mortality, focusing on the role of health behaviors. The British Whitehall II cohort study, which included 9590 civil servants followed for 24 years, found that lower SEP was associated with higher mortality. Health behaviors, including smoking, alcohol consumption, diet, and physical activity, explained a significant portion of this gradient. When assessed at baseline, these behaviors explained 42% of the gradient in all-cause mortality, 29% in cardiovascular disease mortality, and 61% in noncancer and noncardiovascular disease mortality. However, when assessed repeatedly over the follow-up period, the explanatory power increased to 72%, 45%, and 94%, respectively. The study highlights the importance of considering changes in health behaviors over time when examining their role in social inequalities in health.This study examines the association between socioeconomic position (SEP) and mortality, focusing on the role of health behaviors. The British Whitehall II cohort study, which included 9590 civil servants followed for 24 years, found that lower SEP was associated with higher mortality. Health behaviors, including smoking, alcohol consumption, diet, and physical activity, explained a significant portion of this gradient. When assessed at baseline, these behaviors explained 42% of the gradient in all-cause mortality, 29% in cardiovascular disease mortality, and 61% in noncancer and noncardiovascular disease mortality. However, when assessed repeatedly over the follow-up period, the explanatory power increased to 72%, 45%, and 94%, respectively. The study highlights the importance of considering changes in health behaviors over time when examining their role in social inequalities in health.