Financial incentives for students, teachers and schools are often used to promote learning. Yet, little is known about whether similar incentives for mayors produce analogous findings. We investigate this question by exploring a results-based financing (RBF) reform in Ceara, Brazil, which redistributes state resources to municipalities based on education performance. Comparing schools on both sides of Ceara’s border over key implementation periods, we show that 9th grade students exposed to the RBF perform 0.15SD higher on mathematics and language tests. These impacts increase two-fold when Ceará offers technical assistance to municipalities (pedagogical and managerial), and become significant for 5th graders. These gains are seen among students in the top performance quantiles but upon reformulating the RBF rule to penalize municipalities with more low performers significantly reduces learning gaps. We are able to discuss several mechanisms: the selection of school principals, teacher training, the provision and quality of textbooks, curriculum coverage, and school homework.