Ideally, elections should peacefully allocate political power and remove bad leaders from office. We study how the electoral mechanism performs when the government can rig elections by manipulating the electoral process ex ante and by falsifying election returns ex post. The extent to which elections contribute to peace and accountability depends on how incumbents trade-off between the two strategies given the institutional constraints. An option to falsify election results without being exposed increases the risk of conflict even if that option is not realized in equilibrium, but an option to use ex-ante manipulation reduces the risk of conflict. Imposing constraints on one strategy of election rigging when the incumbent can substitute it with another leads to perverse trade-offs: Constraining ex-ante manipulation raises the risk of conflict, but may improve accountability. Making ex-post falsification more difficult to hide improves the prospect of peace, but worsens accountability.