When a party or candidate loses the popular vote but still wins the election, do voters view the winner as legitimate? This scenario, known as an electoral inversion, describes the winners of two of the last six presidential elections in the United States. We report results from two experiments testing the effect of inversions on democratic legitimacy in the US context. Our results indicate that inversions significantly decrease the perceived legitimacy of winning candidates. Strikingly, this effect does not vary with the margin by which the winner loses the popular vote, nor by whether the candidate benefiting from the inversion is a co-partisan. The effect is driven by Democrats, who punish inversions regardless of candidate partisanship; few effects are observed among Republicans. These results suggest that the experience of inversions increases sensitivity to such outcomes among supporters of the losing party.