Social identity is embedded in social structures, generated by various social processes, and has multiple dimensions. We report findings from a laboratory experiment eliciting two-dimensional social identities: a horizontal identity determined either randomly or by preferences and a vertical identity defined by income status and determined either by luck or performance. We also vary income gaps between vertical identity groups. Participants make redistributive allocation decisions between two beneficiaries differing in identity attributes. We find robust evidence of in-group favoritism and that both the identity distance between the allocator and the in-group recipient and income gaps influence the degree of in-group favoritism.