Political corruption is a concern of many modern democracies. It weakens democratic institutions, restricts public services, and lowers productivity undermining economic development. Yet despite its importance, our understanding of what determines corruption is limited. This paper uses a novel dataset of political corruption in local governments, constructed from reports of an anti-corruption program in Brazil, to test whether the possibility of re-election affects the level of rents extracted by incumbent politicians. Exploiting variation induced by the existence of a term limit, we find that in municipalities where mayors are in their final term, there is significantly more corruption compared to similar municipalities where mayors can still be re-elected. In particular, the share of resources misappropriated is, on average, 57 percent larger in municipalities with lame-duck mayors. The findings suggest that electoral rules that enhance political accountability play a crucial role in constraining politician's corrupt behavior.