Weak electoral registration requirements are commonly thought to encourage electoral participation, but may also promote electoral fraud. As one possibility, candidates and their supporters can more easily mobilize voters who do not reside within the district to register there fraudulently and vote for that district's candidates. We statistically detect this classic type of electoral fraud for the first time, by taking advantage of a natural experimental setting in Japanese municipal elections. We argue that whether or not a municipal election was held in April 2003 can be regarded as an "as-if" randomly assigned treatment. A differences-in-differences analysis of municipality-month panel data shows that the increase in the new population just prior to April 2003 is significantly larger in treatment municipalities (with an election) than in control ones (without an election). The estimated effects are decisive enough to change the electoral results when the election is competitive. We argue that our approach-"election timing as treatment"-can be applied to investigate not only this type of electoral fraud but also electoral connections in other countries.