This paper evaluates school choice at the compulsory-school level by assessing a reform implemented in Sweden in 1992, which opened up for publicly funded but privately operated schools. In many local school markets, this reform led to a significant increase in the quantity of such schools as well as in the share of pupils attending them. We estimate the impact of this increase in private enrolment on the average achievement of all pupils using within-municipality variation over time, and controlling for differential pre-reform municipality trends. We find that an increase in the private-school share by 10 percentage points increases average pupil achievement by almost 1 percentile rank point. We show that this total effect can be interpreted as the sum of a private-school attendance effect and a competition effect. The former effect, which is identified using variation in school choice among siblings, is found to be only a small part of the total effect. This suggests that the main part of the achievement effect is due to more competition in the school sector, forcing schools to improve their quality. We use grade point average as outcome variable. A comparison with test data suggests that our results are not driven by differential grade-setting standards in private and public schools. We further find that more competition from private schools increases school costs. There is also some evidence of sorting of pupils along socioeconomic and ethnic lines.