Purpose – The purpose of this paper is to investigate conditions under which voters’ comparison of relative performance between adjacent jurisdictions can help reduce rent-seeking by politicians. Design/methodology/approach – A theoretical model was developed to examine the effectiveness of yardstick competition in restraining political corruption, first under a static setting, and then under a dynamic setting, using optimal control theory and differential games. It is assumed that voters compare the performance of their incumbent government with that of a neighboring jurisdiction. The incumbent can provide a public good and extract rent, which are financed by imposing a distortionary tax on the population. Politicians derive utility from rent as well as from popularity. The stock of reputation builds up or decays over time. Reputation is decreasing in rent appropriation. Findings – Without assigning an ex ante type on the politician, the paper demonstrates the possibility that yardstick competition itself fails to restrict rent seeking. When the model is extended to a dynamic setting, it is shown that under unitary performance evaluation, dynamic incentives restrain the politician only if the shadow value of reputation (that measures current and future marginal benefits of increased reputation) is sufficiently high throughout the term. it is shown that, for such a high shadow value to exist, benefits of both instantaneous and end-of-period reputations have to be high enough. On the other hand, under relative performance evaluation, dynamic incentives impose more restrictions on rent appropriation in comparison to the static case. Originality/value – This paper offers the first formal analysis, using differential games, of the role of the interaction between electoral considerations and neighborhood demonstration effects (with respect to relative rent extraction) in determining a politician's optimal rent-seeking behaviour.