People learn by observing others, albeit not uniformly. Witnessing an immoral behavior causes observers to commit immoral actions, especially when the perpetrator is part of the in-group. Does conformist behavior hold when observing the out-group? We conducted three experiments (N=1,358) exploring how observing an (im)moral in-/out-group member changed decisions relating to justice: Punitive, selfish, or dishonest choices. Only immoral in-groups increased immoral actions, while the same immoral behavior from out-groups had no effect. In contrast, a compassionate or generous individual did not make people more moral, regardless of group membership. When there was a loophole to deny cheating, neither an immoral in-/out-group member changed dishonest behavior. Compared to observing an honest in-group member, people become more honest themselves after observing an honest out-group member, revealing that out-groups can enhance morality.Depending on the severity of the moral action, the in-group licenses immoral behavior while the out-group buffers against it