Background: Given the strong relationship between depression and anxiety, there is an urge to investigate their shared and specific long-term course determinants. The current study aimed to identify and compare the main determinants of the 9-year trajectories of combined and pure depression and anxiety symptom severity. Methods: Respondents with a 6-month depression and/or anxiety diagnosis (n=1,701) provided baseline data on 152 sociodemographic, clinical and biological variables. Depression and anxiety symptom severity assessed at baseline, 2-, 4-, 6- and 9-year follow-up, were used to identify data-driven course-trajectory subgroups for general psychological distress, pure depression, and pure anxiety severity scores. For each outcome (class-probability), a Superlearner (SL) algorithm identified an optimally weighted (minimum mean squared error) combination of machine-learning prediction algorithms. For each outcome, the top determinants in the SL were identified by determining variable-importance and correlations between each SL-predicted and observed outcome (ρpred) were calculated. Results: Low to high prediction correlations (ρpred: 0.41-0.91, median=0.73) were found. In the SL, important determinants of psychological distress were age, young age of onset, respiratory rate, participation disability, somatic disease, low income, minor depressive disorder and mastery score. For course of pure depression and anxiety symptom severity, similar determinants were found. Specific determinants of pure depression included several types of healthcare-use, and of pure-anxiety course included somatic arousal and psychological distress. Limitations: Limited sample size for machine learning. Conclusions: The determinants of depression- and anxiety-severity course are mostly shared. Domain-specific exceptions are healthcare use for depression and somatic arousal and distress for anxiety-severity course.