A central debate in economics concerns the relationship between competition and innovation, with some stressing that competition discourages innovation by reducing post-innovation rents and others emphasizing that more contestable markets spur currently dominant and other firms to invest more in innovation. We examine the impact of competition laws on innovation. We create a unique firm-level dataset on patenting activities that includes over 1.4 million firm-year observations, across 68 countries, from 1991 through 2015. Using a new, comprehensive dataset on competition laws, we find that more stringent competition laws are associated with increases in firms’ number of self-generated patents and the citation-impact and explorative nature of those patents. We also conduct the first examination of the relationship between competition laws and firms’ acquisition of patents from other firms. We find that competition increases patent acquisitions but lowers the ratio of acquired to self-generated patents. The results hold when using country-industry data on 186 countries over the 1888-2015 period.