Rising hostility between members of opposing political factions has gained considerable attention in both academic and popular press. The adverse effects of this phenomenon are widely recognized, but its psychological antecedents remain the focus of ongoing debate in political psychology. Past research has honed in on two conflicting explanations: one highlights the extent to which people self-define as supporters of particular parties or candidates (the identity view), and another points toward the intensity with which they disagree on substantive matters of policy (the issues view). A nationally representative survey of 1051 eligible Spanish voters yielded support for both explanations. The perceived magnitude and nature of disagreement were associated with increased partisan prejudice, while controlling for partisan identification. Path analyses revealed that issue-based prejudice was more pronounced among ideologically extreme agents (beta = 0.237, 95% CI [0.174, 0.300]) than toward extreme targets (beta = 0.140, 95% CI [0.078, 0.201]), and replicated recent findings that identity-based prejudice is motivated primarily by non-instrumental factors (beta = 0.286, 95% CI [0.230, 0.337]). Together, these results indicate that discrimination across party lines responds to two fundamentally distinct, though at times co-occurring, imperatives: to coalesce in ideologically homogeneous communities, and to protect one's sense of partisan identity.