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, can give power to candidates or parties in democratic systems who lose the popular vote, including the winners of two of the last five presidential elections in the United States. We report results from two experiments testing the effect of inversions on democratic legitimacy in the U.S. 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 they are 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 inversions may increase sensitivity to such outcomes among supporters of the losing party.