Ethnic and racial intergroup attitudes are assumed to develop due to the influence of socialization contexts. However, there is still little longitudinal evidence supporting this claim. We also know little about the relative importance of socialization contexts, the possible interplay between them as well as about the conditions and mechanisms that might underlie socialization effects. This longitudinal study of adolescents (N = 517) examined the effects of parents and peers’ anti‐immigrant attitudes as well as intergroup friendships on relative changes in adolescents’ anti‐immigrant prejudice, controlling for the effects of socioeconomic background. It also examined whether the effects of parents or peers would depend on adolescents’ intergroup friendships. In addition, it explored whether the effects of parents, peers, and intergroup friendships would be mediated or moderated by adolescents’ empathy. Results showed significant effects of parents, peers, intergroup friendships, and socioeconomic background on changes in youth attitudes, highlighting the role of parental prejudice. They also showed adolescents with immigrant friends to be less affected by parents and peers’ prejudice than youth without immigrant friends. In addition, results showed the effects of parents, peers, and intergroup friendships to be mediated by adolescents’ empathic concern. Theoretical and practical implications of these findings are discussed.