This paper extends the approach of the inverted-U relationship between competition and innovation at the industry level introduced by Aghion and coauthors. We use data of Spanish manufacturing firms from the Survey of Business Strategies (ESEE) spanning 1990–2006, as well as external information on patents from the European Patent Office and US Patent Office. Instead of an inverted-U shape, we obtain an unambiguous positive relationship between competition and patents. To explain this positive relationship, we modify their theoretical model to introduce the possibility of inefficient firms facing the threat of exit when competition intensifies. The modified model may explain both a positive and an inverted-U relationship between competition and innovation. The estimated results also support the theoretical conjecture that competition induces firms’ exit that, in turn, explains our empirical finding of a negative relationship between competition and within-industry technological gap.