Sweden has long been associated with educational equity, yet growing achievement gaps challenge the idea that schools can compensate for differences in students’ home backgrounds. This dissertation examines whether teaching quality in Grade 8 science classrooms can serve such a compensatory role. Focusing on biology, chemistry, and physics as separate subjects, it investigates how teaching quality, teacher characteristics, and students’ motivational beliefs relate to science achievement and to socioeconomic differences in achievement. Drawing on Swedish TIMSS data from 2015, 2019, and 2023, the dissertation uses multilevel structural equation modelling and a withinstudent- between-subjects design to study classroom processes and inequalityrelated patterns in learning. It pays particular attention to cognitive activation, instructional clarity, and students’ motivation, and explores whether these factors mediate or moderate the relationship between socioeconomic background and achievement. The findings show that socioeconomic background remains strongly related to both achievement and motivation, while the examined dimensions of teaching quality were more clearly associated with motivational experiences than with reduced achievement gaps. By linking teaching quality and educational equity in lower secondary science classrooms, the dissertation contributes to ongoing discussions on the possibilities and limits of teaching as a compensatory mechanism in the Swedish school context.