In this paper, we merge the heterogenous firm trade model of Melitz (2003) with the Ricardian model of Dornbusch, Fisher and Samuelson (DFS 1977) to explain how the pattern of international specialization and trade is determined by the interaction of comparative advantage, economies of scale, country sizes and trade barriers. The model is able to capture the existence of inter-industry trade and intra-industry trade in a single unified framework. It explains how trade openness affects the pattern of international specialization and trade. The paper examines the generality of Melitz's firm selection effect in a multi-sectoral setting. Although opening to trade is unambiguously welfare-improving in both countries, trade liberalization can lea...