This paper studies the effect of competition on ethnic discrimination by carrying out a field experiment in the context of the rice market in Bangladesh. We recruit professional rice buyers (middlemen) to act as judges in a rice competition by providing a quality rating and a price quote for rice samples that we randomly associate with farmers bearing ethnic majority or minority names. First, we find that there is no ethnic difference in buyers' evaluation of rice quality. Second, we find that local buyers, who have local monopsony power, discriminate against ethnic minority farmers by quoting a lower price for their rice relative to that of ethnic majority farmers. Third, we find that wholesale buyers, who face fierce competition in the marketplace, do not price discriminate against ethnic minority farmers. A second lab-in-the-field experiment and survey information indicate that local and wholesale buyers do not have different tastes for discrimination. This suggests that market competition can eliminate the discrimination of wholesale buyers.