Tested on a sample of 1,365 Hong Kong primary school students from five grades, teacher preference or the extent to which the classroom teacher likes a child in the class was found to both mediate and, to a lesser extent, moderate the relations between children's social behaviors and peer acceptance across age groups. The mediating effect suggests that peer acceptance responds not only to the behavior of a student but also to how much the classroom teacher likes or dislikes the student. The moderating effect suggests that the associations between student social behaviors and peer acceptance differ as functions of teacher preference. The mediating teacher preference was stronger with younger children, whereas a stronger moderating teacher preference was found for the older children. These findings confirm the supposition that three social processes involving the teacher, children, and peers contribute to children's social status and relations in the classroom.