We use a regression discontinuity design in rural Morocco to study whether the enrollment gains from conditional cash transfer programs translate into learning benefits. Unlike most previous studies, we estimate the effects of a sustained exposure during whole primary school. We find small and seemingly negative effects on test scores at the end-of-primary school exam. Concomitant increases in class size suggest that the program constrained learning by putting additional pressure on existing resources in beneficiary areas. These results are particularly relevant for settings where transfers are geographically targeted with no measures to absorb the extra influx of students.