When and how do third-party actors -- most prominently electoral commissions and observers -- contribute to the integrity of the electoral process? We approach these questions by studying how third-party actors shape politicians' incentives to comply with the outcomes of elections. We show that third-parties are most beneficial in close elections, when the threat of a post-election confrontation alone fails to ensure self-enforcing compliance with election outcomes. Our analysis highlights that third-parties do not need to be impartial to be politically consequential, that it is third-parties with a moderate pro-incumbent bias that will be in the interest of not only the opposition but also the incumbent, and that incumbents adopt politically consequential third-party institutions when they fear that an election that they expect to narrowly win might be incorrectly perceived as the opposition's victory and followed by a costly post-election confrontation. Extensions of our model consider the role of election observers and repression. Our results clarify not only the potential but also the limits to institutional solutions to the problem of electoral compliance in new and transitioning democracies.