We study the welfare gains from trade in an economy with heterogeneous firms, variable markups and endogenous growth. Variable markups arise from oligopolistic competition, and cost-reducing innovation is the engine of long-run growth. Trade liberalisation stiffens competition by reducing markups, generating tougher firm selection and increasing the aggregate productivity level. Selection increases firms’ incentives to innovate, thereby leading to a higher aggregate productivity growth rate. Endogenous productivity growth boosts the selection gains from trade, leading to substantial welfare improvements. A calibrated version of the model shows that growth doubles the welfare gains obtainable in models with static firm-level productivity.