We use a laboratory experiment to investigate how the introduction of competition between public officials for the provision of a government service affects extortionary corruption, i.e., the demands of harassment bribes. We examine transactions that are likely to be one-shot, such as the delivery of a driver's license, and transactions that require frequent interactions between the parties and therefore allow for reputation building, such as yearly renewals of building permits. Finally, we examine officials’ ability to collude by communicating before setting their bribe demands. We find that introducing competition significantly reduces corruption both in settings characterized by one-shot and by repeated interactions between citizens and officials. While the possibility of collusion lowers the effectiveness of competition, officials are unable to sustain collusion in the long run.