We study the effects of a conditional transfers program on school enrollment and performance in Mexico. We provide a theoretical framework for analyzing the dynamic educational decision and process including the endogeneity and uncertainty of performance (passing grades) and the effect of a conditional cash transfer program for children enrolled at school. Careful identification of the program impact on this model is studied. This framework is used to study the Mexican social program Progresa in which a randomized experiment has been implemented and allows us to identify the effect of the conditional cash transfer program on enrollment and performance at school. Using the rules of the conditional program, we can explain the different incentive effects provided. We also derive the formal identifying assumptions needed to provide consistent estimates of the average treatment effects on enrollment and performance at school. We estimate empirically these effects and find that Progresa had always a positive impact on school continuation whereas for performance it had a positive impact at primary school but a negative one at secondary school, a possible consequence of disincentives due to the program termination after the third year of secondary school.