Discouragement is a process occurring during an unemployment spell. As the spell prolongs, an individual gradually realises that the returns to search can no longer outweigh search costs, and hence she may eventually leave the labour force. This is analysed theoretically in a framework of unemployed search. We construct a search model, which is stationary from the point of view of the individual, but which has nonstationary features. Namely, the unemployed worker is occasionally hit by shocks leading to a decline in job offer arrival rates. These shocks can be due to stigmatisation or to psychological consequences of unemployement affecting search effectiveness. This model enables us to analyse the issue of discouragement, as the returns to search will gradually decline. Even so, the model is actually stationary from the point of view of the individual, which implies that many interesting theoretical results may be derived. Moreover, from the point of view of the researcher, the model exhibits negative duration dependence in the hazard rate into employment and positive duration dependence in the hazard rate into non-participation, features which correspond well to real data. We use the model to analyse theoretically the impact of changes in unemployment insurance and social assistance benefits, and we conduct some simulation exercises based on a calibrated model.