Is it better to be first in a village than second in Rome, as Caesar claimed? Peer groups can impact later outcomes through two distinct yet related channels: the group's intrinsic quality and one's relative position within this group. The Italian public school setting is an advantageous quasi-laboratory to investigate this question. Using panel data on Italian students over 2013-2019, we compare the effect of a student's relative position in their peer group (class rank) to the effect of class quality in primary school on later academic outcomes. We design a new strategy to identify the rank effect by leveraging two sets of scores: grades on a national standardized test and grades on class exams. Standardized test grades are used to control for ability, alongside student fixed effects. Class grades are used to construct the class rank. We exploit the variation in rank coming from differences in teachers' grading pattern and offer evidence that our measure of rank is as good as random, once we control for our proxies for ability. We find that ranking at the top of the class compared to the bottom in primary school is associated with a gain of 8.1 percentiles in the national standardized grade distribution in middle school and 7.6 in high school. We further show that Caesar was misguided: the effect of a one standard deviation increase in rank amounts to 20% of the effect of a similar increase in class quality, conditional on the rank. Finally, using an extensive student survey, we establish that the rank effect is mediated through student sorting into better high schools and higher interest in academic subjects, self-esteem, peer recognition, and career prospects.