Little is known in developing country environments about how a child's cognitive skills manifested in the first years of schooling are related to later educational success, because the panel data needed to analyze this question have been lacking. This study takes advantage of a unique data set from Senegal that combines test score data for children from the second grade with information on their subsequent school progression from a follow-up survey conducted seven years later. Measures of skills from early primary school, corrected for measurement error using multiple test observations per child, are strongly positively associated with later school progression. A plausible interpretation is that parents invest more in a child's education when the returns to doing so are higher. The results point to the need for remedial policies to target lagging students early on to reduce early dropout. Grade repetition policies target poorly performing students and are pervasive in Francophone Africa. Using variation across schools in test score thresholds for promotion to identify the effects of second-grade repetition, the analysis shows that repeating students are more likely to leave school before completing primary school than students with similar ability who are not held back, pointing to the need for alternative measures to improve the skills of lagging children.