Background: Although there is some evidence that older people might have a poorer course of major depressive disorder (MDD) than younger or middle-aged people, and that age-related course differences might affect the optimisation of MDD treatment, large-scale studies with a broad age range, including consistent course assessments, are needed to properly address this issue. Therefore, we aimed to longitudinally examine whether older age was associated with a poorer naturalistic course trajectory of MDD than that of younger ages and to establish which prognostic—clinical, social, and health—factors could explain this potentially poorer course. Methods: For this longitudinal cohort study, we used baseline and 2-year follow-up data from the Netherlands Study of Depression and Anxiety (NESDA) and the Netherlands Study of Depression in Older Persons (NESDO) cohorts. People aged between 18 and 88 years, with an MDD diagnosis at baseline, and a valid clinical assessment at 2-year follow-up were included. The primary outcome was the 2-year course of MDD, which was assessed by use of four indicators: having a depression diagnosis (MDD or dysthymia) after 2 years, having a chronic symptom course (depressive symptoms present during 80% or more of the 2-year follow-up period), time to remission, and depression severity change. We used multivariate analyses to examine associations between continuous age and these MDD course indicators. We also examined whether prognostic clinical (eg, comorbid anxiety), social (loneliness and social support), and health (body-mass index, pain, and chronic diseases) factors contributed to the differences in the course of MDD between age groups. Findings: Between 2004–2012, baseline and 2-year follow-up data were obtained for 1042 participants from the NESDA and NESDO cohorts, of whom 690 (66%) were women. Older age was significantly associated with a worse 2-year MDD course for all four indicators (MDD diagnosis: odds ratio [OR] 1·08, 95% CI 1·00–1·17; chronic symptom course: OR 1·24, 1·13–1·35; time to remission: hazard ratio [HR] 0·91, 0·87–0·96; and depression severity change: regression coefficient 1·06, p<0·0001; all per 10-year increase). The course of MDD worsened linearly with age, and people aged 70 years or older had the worst outcomes compared with those of the reference group of people aged 18–29 years (MDD diagnosis: OR 2·02, 95% CI 1·18–3·45; chronic symptom course: OR 3·19, 1·74–5·84; time to remission: HR 0·60, 0·44–0·83; and depression severity change: −12·64 [SD 10·85] in those aged 18–29 years and −5·57 [11·14] in those aged 70 years or older). These results were slightly reduced, but remained mostly significant when adjusting for prognostic clinical, social, and health factors. Interpretation: Older age was found to be a consistent and important risk factor for a poorer MDD course, which could not be explained by a range of well established risk factors. Further investigation of potential underlying mechanisms—including the effect of cognitive impairment, for example—is needed to prevent the negative consequences of a long-term MDD burden in older people. Funding: Netherlands Organisation for Health Research and Development, Fonds NutsOhra, Stichting tot Steun VCVGZ, NARSAD The Brain and Behaviour Research Fund, and European Union's 7th Framework Programme.