Objectives The demographic changes in Europe underline the need for an extension of working lives. This study investigates the importance of physical work demands and psychosocial work factors for working beyond the state pension age (65 years). Methods We combined data from three cohorts of the general working population in Denmark (DWECS 2005 and 2010, and DANES 2008), where actively employed workers aged 55-59 years replied to questionnaires about work environment and were followed until the age of 66 years in the Danish AMRun register of paid employment. Using logistic regression analyses, we calculated prevalence ratios (PR) and 95% confidence intervals (CI) for the association between physical and psychosocial work factors and working beyond state pension age, adjusted for age, sex, cohort, cohabiting, sector, income, vocational education, working hours, lifestyle, and previous sickness absence. Results Of the 2884 workers aged 55-59 years, 1023 (35.5%) worked beyond the state pension age. Higher physical work demands was associated with a lower likelihood (PR 0.69, 95% CI 0.58-0.82) and a good psychosocial work environment was associated with higher likelihood (average of 7 items: PR 1.81, 95% CI 1.49-2.20) of working beyond state pension age. Stratified analyses did not change the overall pattern, ie, a good overall psychosocial work environment - as well as several specific psychosocial factors - increased the likelihood of working beyond state pension age, both for those with physically active and seated work. Conclusion While high physical work demands was a barrier, a good psychosocial work environment seems to facilitate working beyond state pension age, also for those with physically active work.