We study the procompetitive gains from international trade in a quantitative model with endogenously variable markups. We find that trade can significantly reduce markup distortions if two conditions are satisfied: (i) there is extensive misallocation, and (ii) opening to trade exposes hitherto dominant producers to greater competitive pressure. We measure the extent to which these two conditions are satisfied in Taiwanese producer-level data. Versions of our model consistent with the Taiwanese data predict that opening up to trade strongly increases competition and reduces markup distortions by up to one-half, thus significantly reducing productivity losses due to misallocation. (JEL D43, F12, F14, L13, L60, O47)