According to social referencing theory, cues peers take from positive and negative teacher behavior toward a student affect the student’s peer liking and disliking status. The present study was the first to test the hypothesized mediation model connecting teacher behavior with peer liking and disliking status, via peer perceptions of teacher liking and disliking for the student. We used a longitudinal design and controlled for peer perceptions of student behavior. A sample of 1,420 5th-grade students (Mage = 10.60) from 56 classes completed sociometric questionnaires at 3 time points within 1 school year. At the first time point video data was also recorded, and teacher behavior toward specific students was coded. A multilevel path analysis showed that teachers did function as social referents for peer status but only through their negative behavior toward a student. Negative teacher behavior was associated with peer perceptions of the teacher’s disliking for the student 3 months later, which in turn predicted peers’ disliking of the student 6 months later. Findings suggest that teachers play a prominent role in peer relationships, particularly in peer disliking. For practice, this suggests that it may be important for teachers to refrain from openly negative behavior toward students, particularly those at risk of peer rejection.