We investigate the effects of group identity and income inequality on social preferences and polarization by means of a laboratory experiment. We split our subjects into two populations: in-group (representing ‘natives’) and out-group (‘migrants’). In-group subjects repeatedly vote whether an unemployment insurance should cover all, some, or no members of their group. By means of a two-by-two design we disentangle the effect of group identity from those of income inequality. Among others, our experiment yields the following findings: (1) subjects tend to vote for less inclusive insurance schemes when they sample a higher chance of employment; however, (2) in-group subjects with an ex ante more beneficial distribution of employment chances – relative to the out-group – are less selfish and vote for more inclusive insurance schemes; (3) ex ante more beneficial relative employment chances of in-group subjects also leads to less polarization; and (4) revelation and priming of group identity does not lead to discrimination against out-group ‘migrants’ but, on the contrary, can lead to more compassionate and inclusive attitudes.