Since student achievement is related to educational attainment and to adult earnings, there is considerable interest in within-country achievement gaps between different social class groups, how they change over time, and the possible sources of those changes. In this paper, we analyze academic achievement gaps over a ten year period in Brazil. Our results suggest that social class inequality in public school student achievement on the Prova Brasil national test increased significantly among Brazilian 5th graders in the period 2007–2017, and that all of this increase was before 2013--indeed, mostly between 2011 and 2013. To the contrary, social class achievement inequality among 9th graders barely increased in 2007–2017, and that small increase appears to have occurred mainly in earlier years. We find that this increased achievement inequality among 5th graders was partly the result of increased inequality between schools with students of higher and lower average school class, and among municipalities with higher and lower income per capita and differing educational policies. Yet, a significant part of the increase is also related to changes in the within-school achievement gaps.