This paper presents a tractable model to study the effect of immigration on host countries' school system and student outcomes. In our model, education quality and student outcomes are determined endogenously by the interaction of parents, schools and policy-makers deciding educational resources. Immigration decisions are based on economic factors, immigration policy, as well as on "parental motivation" (parents' concerns about their children education achievement). The model yields results that are consistent with central empirical regularities of the school effects of immigration: (1) there is a negative effect of immigrant pupils on native students;We thank Paula Calvo for excellent research assistance. We thank Roberto Burguet, Jesus (2) the increasing shares of immigrant students are associated with the decline of school resources and quality; (3) the school performance of immigrant children is positively associated with immigration costs; and (4) school achievement increases in parental motivation and those immigrant children with highly motivated parents tend to outperform native children. Importantly, our analysis clarifies under which conditions these empirical regularities take place and emphasizes that the effect of immigration on native pupils is mediated by the way the school system reacts to changes in class composition.