The COVID-19 pandemic has prompted severe restrictions on everyday life to curb the spread of infections. For example, teaching at universities has been switched to an online format, reducing students' opportunities for exchange, and social interaction. Consequently, their self-reported mental health has significantly decreased and there is a pressing need to elucidate the underlying mechanisms—ideally considering not only data collected during the pandemic, but also before. One hundred seventeen German university students aged 18-27 were assessed for known resilience factors (optimism, self-care, social support, generalized self-efficacy) and subsequently completed surveys on stress experiences and mental health every 3 months over a period of 9 months before the outbreak of the pandemic and once during the first lockdown in Germany. For each timepoint before the pandemic, we regressed participants' mental health against the reported stressor load, such that the resulting residuals denote better or worse than expected outcomes, i.e., the degree of resilient functioning. We then tested whether different expressions in the resilience factors were predictive of distinct resilient functioning trajectories, which were identified through latent class growth analysis. Finally, we investigated whether trajectory class, resilience factors, and perceived stress predicted resilience during the pandemic. Results show rather stable resilient functioning trajectories, with classes differing mainly according to degree rather than change over time. More self-care was associated with a higher resilient functioning trajectory, which in turn was linked with the most favorable pandemic response (i.e., lower perceived stress and more self-care). Although findings should be interpreted with caution given the rather small sample size, they represent a rare examination of established resilience factors in relation to resilience over an extended period and highlight the relevance of self-care in coping with real-life stressors such as the pandemic.