Purpose - The purpose of this paper is to emphasize the importance of product quality in differentiated-products markets in determining the structure of competition among firms. Design/methodology/approach - First, two distinct models of firm heterogeneity are considered as two possible structures for firms' competition: "price competition" and "quality competition." Then, the author exploits the bilateral trade data of the world's 83 largest countries in order to examine a link between the empirical findings and the theoretical models. Findings - The empirical findings support a model of "quality competition" rather than "price competition," in which firms in a country with a comparative advantage in a given product tend to improve their product quality as opposed to lowering production costs, so they compete on the quality-adjusted price. Research limitations/implications - This paper used product-level data to examine the spatial pattern of the average export unit value of a product, which is able to answer the question of whether an industry is involved with quality competition. The product-level data used in this study, however, are not ideally suitable for exploring the predictions of a heterogeneous firms' trade model. Originality/value - To the best of the author's knowledge, this is the first paper that investigates a relationship between the country-product pair of comparative advantages and firms' self-selection behavior in the product-level data to shed light on the role of product quality in determining the structure of firms' competition.