Aims: to assess whether there is a change in the prevalence of depression and suicidal ideation after the strict lockdown measures due to the first wave of the COVID-19 pandemic in Spain; and to assess which are the factors associated with the incidence of a depressive episode or suicidal ideation during the lockdown. Methods: data from a longitudinal adult population-based cohort from the provinces of Madrid and Barcelona was analysed (n=1103). Structured face-to-face home-based interviews (pre-pandemic) and telephone interviews were performed. Both depression and suicidal ideation were assessed through an adaptation of the Composite International Diagnostic Interview (CIDI 3.0). A variety of validated instruments and sociodemographic variables including age, sex, educational level, occupational status, home quietness, screen time, resilience, loneliness, social support, physical activity, disability, economic situation, and COVID-19 related information were also considered. Population prevalence estimates and multivariable logistic regressions were computed. Results: overall, prevalence rates of depression and suicidal ideation did not change significantly from before to after the COVID-19 outbreak. However, the rates of depression among individuals aged 50+ years showed a significant decrease compared to before the pandemic (from 8.48% to 6.41%; p=0.01). Younger individuals (OR=0.97; 95% CI=0.95-0.99) and those feeling loneliness (OR=1.96; 95% CI=1.42-2.70) during the lockdown were at increased risk of developing depression during the confinement.Resilience showed a protective effect against the risk of depression (OR=0.46; 95% CI=0.32-0.66) and suicidal ideation (OR=0.33; 95% CI=0.16-0.68), while individuals perceiving social support were at lower risk of developing suicidal thoughts (OR=0.35; 95% CI=0.18-0.69). Conclusions: continuous reinforcement of mental health preventive and intervening measures during and in the aftermath of the crisis is of global importance, particularly among vulnerable groups who are experiencing the most distress. Future research should strive to evaluate the long-terms effects of the COVID-19 crisis on mental health.