Theories of taste-based discrimination predict that competitive pressures will drive discriminatory behavior out of the market. The authors analyze how firm takeovers and product market competition affect firms' gender composition and gender wage gap using detailed matched employer-employee data. Taking into account several endogeneity concerns while using a difference-in-difference framework, they find that the share of female employees increases as a result of an ownership change when product market competition is weak. Furthermore, a takeover reduces the gender wage gap. Although the estimated effects are small, the results support the main theoretical predictions.