People generally empathize with others and find harm aversive. Yet aggression, e.g., between groups, abounds. How do people learn to overcome this aversion in order to aggress? Many models of learning emphasize outcome prediction errors-deviations from expected outcomes in the environment-but aggression may be fueled also by affective prediction errors (affective PEs)-deviations from how we expect to feel. Across five pre-registered online experiments that hold outcome prediction errors constant (N=4607), participants choosing aggressive or non-aggressive actions aggressed more against disliked group members, and often escalated or persisted in taking actions that felt better than expected (positive affective PE), especially when those actions were aggressive. Crucially, inducing incidental empathy toward the group of the target rendered affective PE signals sensitive to group identification-participants escalated aggression that felt better than expected relatively less towards liked versus disliked group members. That said, affective PEs did not always add explanatory power beyond levels of postoutcome affect alone; we discuss the importance and implications of these results. In summary, we reveal affective PE integration as a candidate algorithm facilitating exceptions to harm aversion in intergroup conflict. More broadly, we highlight for affective science and decisionmaking researchers the necessity of appropriately testing separable components of affective signals in predicting subsequent behavior.