Background. The COVID-19 pandemic has had a profound effect on societies, economies, and daily life of citizens worldwide. This has raised important concerns about the mental health of different populations. We aimed to determine if symptom levels of depression, anxiety, and stress were different during the COVID-19 outbreak compared to before, with the Depression, Anxiety and Stress Scale as main outcome. We also aimed to determine whether pre-pandemic loneliness, poor sleep quality and mental health problems were associated with worse trajectories of mental health. Methods. We conducted a cohort study with 1658 Swedish university students answering questionnaires before the pandemic and a 81 % response-rate to follow-ups during the pandemic. Generalized Estimating Equations were used to estimate mean levels of symptoms before and during the pandemic, and to estimate effect modification by levels of loneliness, sleep quality and pre-existing mental health problems. Results. We found small differences in symptoms. Mean depression increased by 0.23/21 (95% CI:0.03 to 0.43), mean anxiety decreased by -0.06/21 (95% CI: -0.21 to 0.09) and mean stress decreased by - 0.34/21 (95% CI: -0.56 to -0.12). Loneliness, poor sleep quality and pre-existing mental health problems minimally influenced trajectories. Conclusions. Contrary to widely held concerns, we found minimal changes in mental health among Swedish university students during the first months of the COVID-19 pandemic.