Although previous studies have investigated the contribution of several components of the school choice paradigm to school segregation, one critical aspect has not received attention from segregation scholars: schools' priority rules, that is, the rules schools apply in case of oversubscription. We evaluate how three priority rules -grade-based, distance-based, and random-based -shape school segregation. Using Swedish register data on students' applications to upper secondary education in Stockholm, Sweden, we assess the effect of these priority rules from two counterfactual frameworks. One uses actual students' rank-ordered lists, and the other relies on a large-scale simulation framework. We show that grade-based and distance-based priorities produce higher levels of segregation than random-based priorities through different mechanisms. Our results hold, even when we control for students' school preferences and residential segregation.