The outcome of the 2016 U.S. Presidential election was a big surprise to many, as the majority of polls had predicted the opposite outcome. In this two-stage cross-sectional study, we focus on how Democrats and Republicans reacted to this electoral surprise and how these reactions might have influenced the way they allocated resources to each other in small groups. We find that, before the election, Republicans showed greater in-group favoritism than Democrats, who treated others equally, regardless of their political affiliation. We then show that Democrats experienced the election outcome as an ego shock and, in the week following the election, reported significantly higher levels of negative emotions and lower levels of self-esteem than Republicans. These reactions then predicted how individuals’ decided to allocate resources to others: after the election, Republicans no longer showed in-group favoritism, while Democrats showed out-group derogation. We find these decisions when the tables were turned can be partially explained by differences in participants’ state self-esteem.