OBECTIVES: To identify differences in risk of sickness absence between socioeconomic groups, and to examine to what extent these differences can be explained by health behaviour and work environment factors. DESIGN, SETTING AND PARTICIPANTS: A cohort of 5221 employees in Denmark interviewed in 2000 regarding health behaviours and work environment were followed for 18 months in order to assess their rate of sickness absence exceeding eight consecutive weeks. Based on employment grade, job title and education respondents were classified into five socioeconomic position (SEP) groups. Executive managers and academics were the reference group. RESULTS: For both genders a social gradient in long-term sickness absence rates was evident. In men, controlling for health behaviours and physical work environment factors reduced rate ratios by 22-57%. Controlling for health behaviours alone reduced rate ratios by 6-13%. In women, controlling for health behaviour reduced rate ratios by 5-18%, and controlling for both health behaviours and physical work environment factors reduced rate ratios by 21-44%. Introducing psychosocial factors reduced the rate ratios further, yielding a reduction of 22-53% in the fully adjusted model. In both genders, the largest reductions were seen in skilled blue-collar workers and for semi-skilled or unskilled workers (by 58-59% in men and by 41-53% in women). CONCLUSION: A social gradient in long-term sickness absence was found. Physical work environment explained more of this gradient than health behaviour. Also including psychosocial work environment in the model had no effect in men but a small effect among women.