We estimate the effects of political accountability on the selection of politicians when accountability mechanisms are prone to political capture. Using a comprehensive dataset that records characteristics of candidates for mayor in the last three local elections in Perú, and using a close election sharp regression discontinuity design, we compare candidates running for mayor in districts where a mayor was ousted from office through a recall referendum in the previous electoral term – increasing the salience of accountability and decreasing the expected term length – with those who run in districts where the recall referendum failed by a small margin. Candidates running for office in districts where the risk of recall is more salient are less educated and have less experience in elected offices and in the public sector and are younger. These findings are consistent with a political agency model in which accountability mechanisms are prone to capture, distorting the main objectives of improving the quality of government. The negative selection of candidates is partially offset by voters, who elect the best politician out of a lower quality pool of candidates.