We employ laboratory experiments to examine the effects of corrupt law enforcement on crime. We embed corruption in a social dilemma where citizens choose whether to obey the law or to break the law and impose a negative externality on others. Police officers observe citizens' behavior and can impose fines on law-breakers or extort bribes from any citizen. We find that the presence of police, even if they are corrupt, substantially reduces crime as compared to a baseline setting without police. Corrupt police officers use bribes in a targeted manner as a substitute for fines to punish law-breakers. We also test the effectiveness of two reward mechanisms aimed at reducing police corruption, both of which are based on society-wide police performance measures and not on the monitoring of individual officers. Both mechanisms make bribery more precisely targeted toward law-breakers, and one of them leads to a moderate reduction in crime.