Does electoral competition increase affective polarization? Can cross-party cooperation depolarize voters? Addressing these questions is challenging since both competition and cooperation are endogenous to political attitudes. Building on social identity theory, and leveraging a natural experiment unfolding over seven Israeli election studies, we demonstrate that enhanced electoral competition, measured by interview date proximity to an election, increases affective partisan polarization. We then consider whether party cooperation can depolarize the electorate. To do so, we leveraged the ambiguity around coalition building in Israel’s 22nd election and implemented a survey experiment where we credibly shaped respondents’ perceptions regarding the likelihood that a unity government will form in the near future. We find that priming party cooperation in the form of a unity government, promotes more tolerance across partisan lines. Our study contributes to the affective polarization literature by causally identifying institutional causes and remedies of polarization in a comparative context.