We analyze a randomized trial of a program that rewarded Kenyan primary school teachers based on student test scores, with penalties for students not taking the exams. Scores increased on the formula used to reward teachers, and program school students scored higher on the exams linked to teacher incentives. Yet most of the gains were focused on the teacher reward formula. The dropout rate was unchanged. Instead, exam participation increased among enrolled students. Test scores increased on exams linked to the incentives, but not on other, unrelated exams. Teacher attendance and homework assignment were unaffected, but test preparation sessions increased.