Teacher judgments and the disciplinary sanctioning of pupils can be understood as a function of the ethnic match, which means whether or not teachers and pupils have the same ethnic background. According to social identity theory, teachers should be motivated to protect positive self-esteem and therefore favour pupils of their ethnic in-group over pupils of their ethnic out-group. Following system justification theory however, it must be assumed that teachers also base their judgments and their disciplinary behaviour on the acceptance of social hierarchies. According to this theory, ethnic minority teachers should therefore favour ethnic majority pupils over ethnic minority pupils. We test these hypotheses by conducting an experimental study among 196 preservice teachers. The results suggest that ethnic majority participants do not discriminate against ethnic minority pupils. However, although ethnic minority participants seem to explicitly favour their in-group, they also implicitly tend to have more negative stereotypes about them. Moreover, the more negative explicit and implicit stereotypes ethnic minority participants have against pupils of their in-group, the more severely they punish pupils of their out-group. This could suggest that ethnic minority participants felt the desire to compensate for a negative view of their in-group by treating their out-group more harshly.