This paper characterizes analytically the optimal tariff of a large one-sector economy with monopolistic competition and firm heterogeneity in general equilibrium, thereby extending the small-country results of Demidova and Rodriguez-Clare (JIE, 2009) and the homogeneous firms framework of Gros (JIE, 1987). The optimal tariff internalizes a markup distortion and a terms of trade externality. It is larger the higher the dispersion of firm-level productivities, and the bigger the country's relative size or relative average productivity. Furthermore, in the two-country Nash equilibrium, tariffs turn out to be strategic substitutes. Small or poor economies set lower Nash tariffs than large or rich ones. Lower transportation costs or smaller fixed market entry costs induce higher equilibrium tariffs and larger welfare losses relative to the case of zero tariffs. Similarly, cross-country productivity or size convergence increases the global welfare loss due to non-cooperative tariff policies. These results suggest that post WWII trends have increased the relative merits of the WTO.