This article analyses how the state in Senegal has managed the hajj since the liberalisation era in the early 2000s. Although the essence of the hajj is religious, it is also deeply political and requires that the state manages complex relations with pilgrims, religious leaders, private travel agencies, politicians and Saudi authorities. This article argues that three inter-related imperatives structure the conduct of the Senegalese state: a security imperative, a legitimation imperative, and a clientelistic imperative. Security concerns lead the state to monitor and control pilgrims travelling to Mecca. Legitimation is seen in the collaborative relations with Sûfi orders and in the framing of the hajj organisation as a ‘public service’. Finally, given the magnitude of financial and symbolic resources attached to the hajj, clientelistic relations are constitutive of state officials’ actions. Overall, despite the post-2000 liberalisation of the hajj, the state has maintained its role as a gatekeeper, regulator and supervisor.