The age-adjusted incidence of cutaneous melanoma (CM) in the Nordic countries has increased during the last 60 years. Few prospective population-based studies have estimated the occupational variation in CM risk over time. To determine occupational variation in CM risk. A historical prospective cohort study with a 45-year follow-up from 1961 to 2005 (Nordic Occupational Cancer Study, NOCCA) based on record linkages between census and cancer registry data for Nordic residents aged 30-64 years in Denmark, Finland, Iceland, Norway and Sweden. National occupational codes were converted to 53 occupational categories, and stratified into indoor, outdoor and mixed work, and into socioeconomic status. The standardized incidence ratios (SIRs) were estimated as observed number of CM cases divided by the expected number calculated from stratum-specific person-years and national CM incidence rates. During a follow-up of 385 million person-years, 83 898 incident cases of CM were identified. In all countries combined, men with outdoor work had a low SIR of 0·79 [95% confidence interval (CI) 0·77-0·81] and men with indoor work had a high SIR of 1·09 (95% CI 1·07-1·11). Differences in women pointed in the same direction. High socioeconomic status was associated with an excess risk: SIR 1·34 (95% CI 1·28-1·40) in men and SIR 1·31 (95% CI 1·26-1·36) in women. Technical, transport, military and public safety workers with potential skin exposure to carcinogens had excess risks. Occupational variation in CM risk may be partly explained by host, socioeconomic and skin exposure factors. Differences in CM risk across socioeconomic groups attenuated slightly over time. © 2020 British Association of Dermatologists.