This paper studies the impact of pre-Great Recession immigrant inflows on the labour market during a recession. It develops a random search model of the labour market featuring vacancy persistence, endogenous return migration, and wage rigidity. Consistent with the Spanish data, some immigrants in the model leave the country during the recession, freeing up jobs for natives. Yet, differences in match-quality draws between immigrants and natives also impact firms’ job creation decisions. The return-migration channel positively affects natives, while job creation effects are negative in the calibrated Spanish economy. I find that immigrants mitigate the impact of the recession and enhance natives’ welfare. During the recession, the native unemployment rate would have been 2 percentage points higher in the absence of the pre-crisis immigration boom. Return migration plays a key role, with short- and medium-run impacts on the native unemployment rate 6 times larger than all other channels combined.