Evidence suggests that our foraging ancestors engaged in the small-scale equivalent of social insurance as an essential tool of survival and evolved a sophisticated psychology of social exchange (involving the social emotions of compassion and anger) to regulate mutual assistance. Here, we hypothesize that political support for modern welfare policies are shaped by these evolved mental programs. In particular, the compassionate motivation to share with needy nonfamily could not have evolved without defenses against opportunists inclined to take without contributing. Cognitively, such parasitic strategies can be identified by the intentional avoidance of productive effort. When detected, this pattern should trigger anger and down-regulate support for assistance. We tested predictions derived from these hypotheses in four studies in two cultures, showing that subjects' perceptions of recipients' effort to find work drive welfare opinions; that such perceptions (and not related perceptions) regulate compassion and anger (and not related emotions); that the effects of perceptions of recipients' effort on opinions about welfare are mediated by anger and compassion, independently of political ideology; and that these emotions not only influence the content of welfare opinions but also how easily they are formed.