This paper investigates the role that discrimination plays in the educational marginalization of foreign youth commonly observed in European countries with a long guestworker tradition. Economic theory offers two basic explanations for discrimination of this form: taste-based discrimination arising from personal prejudices and statistical discrimination stemming from ability uncertainty. Which theory applies in reality has important policy implications. If taste-based discrimination is the source of ethnic segregation, then measures to eliminate prejudice are required to promote integration; whereas if statistical discrimination is the cause, then better measures of ability are needed. Using Switzerland as a case study, we provide evidence that statistical discrimination is the source of ethnic segregation in schooling. Further we find that teachers generally do not grade foreign youth differently than native students. This result runs counter to previous research which suggests that disadvantaged pupils are graded more leniently.