How does competition affect innovation? We address this question by using a novel approach to measure quality — an important component of innovation — using highly disaggregated product data for a large set of countries. Constructing an internationally comparable measure of quality enables us to separate the effect of reducing import tariffs, our measure of competition, on quality upgrading from other country level differences in competitive environments, and product demand shocks. We base our analysis on recent theoretical frameworks that predict that the effect of competition on innovation depends on firms’ proximity to the world technological frontier. As predicted by theory, we find that lower tariffs are associated with quality upgrading for products close to the world frontier; whereas lower tariffs discourage quality upgrading for varieties distant from the frontier.