Social protection programmes have emerged as one of the most important anti-poverty policy strategies in developing countries. Their effects on poverty and well-being have been widely studied. Yet, there is limited knowledge on how a transfer programme should respond to the dynamics of poverty. This paper contributes to the existing literature on social protection by providing an analysis of the implications of poverty dynamics for the graduation of beneficiaries of Mexico's Oportunidades programme. To the best of our knowledge, this is the first study that provides a framework for a generic graduation condition, to the extent that it can be applied to any other transfer programme with means tests or proxy-means tests. By estimating a Markovian transition model that accounts for unobserved heterogeneity, state dependence, and attrition, and using three rounds of the longitudinal Mexican Family Life Survey, we find that Oportunidades could 'graduate' only 28.9 and 26.7 per cent of beneficiary households in urban and rural areas, respectively. Our results also show that the 'recertification' or eligibility assessment of Oportunidades - which takes place every three years - could be optimized by conducting it every 3.5 and 4.1 years in urban and rural areas, respectively.