When treatment effects of active labour market programmes are heterogeneous in an observable way across the population, the allocation of the unemployed into different programmes becomes a particularly important issue. In this paper, we present a statistical model designed to improve the present assignment mechanism, which is based on the discretionary choice of case workers. This is done in a duration model context, using the timing-of-events framework to identify causal effects. We compare different assignment mechanisms, and the results suggest that a significant reduction in the average duration of unemployment spells may result if a statistical programme assignment model is introduced. We discuss several issues regarding the implementation of such a system, especially the interplay between the statistical model and case workers.