This paper examines potential causal mechanisms through which democratic elections can affect local-level corruption. It compares the motives of elected and appointed village leaders to refrain from misappropriating public resources, considering both their intrinsic preferences and the extent to which their choices are constrained by concerns for their social reputations and future interactions in the village. Based on a behavioral experiment with local leaders in 48 Tanzanian villages, the paper shows that elected village leaders are intrinsically more motivated to refrain from rent extraction than externally appointed village leaders or ordinary citizens. However, the benefits of electoral selection can be undermined if elected leaders face incentives that discourage voluntary restraint.