This study investigated how students’ ethnic pride was related to variation in ethnic composition between classrooms as well as within the same classroom over time. Predictions derived from optimal distinctiveness theory (ODT) were tested among 13- to 14-year-old ethnic majority and minority students (N = 1,123). Lending support to ODT, a curvilinear relation between the share of same-ethnicity classmates and students’ ethnic pride was found in a cross-sectional analysis, with ethnic pride peaking in classrooms with approximately 50% same-ethnicity classmates. In line with ODT, longitudinal analyses revealed ethnic pride decreased for students who moved away from a share of 50% same-ethnicity classmates. Contrary to ODT, however, ethnic pride also decreased for students who moved closer to this point of optimal distinctiveness.