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