The effect of increasing school resources on educational outcomes is a central issue in the debate on improving school quality. In this paper we use a randomized experiment to analyze the impact of a school grants program in Senegal, which allowed schools to apply for funding for improvements of their own choice. We find positive effects on test scores at lower grades that persist at least two years. These effects are concentrated among schools that focused funds on human resources improvements rather than school materials, suggesting that teachers and principals may be a central determinant of school quality.