In a setting of R&D competition, we study how collaboration affects strategic decisions during a patent contest, and how the latter influences the collaboration network structures the firms can form. We use an all pay auction approach to endogenize both network formation and R&D intensities, and to take heterogeneous and private valuations for patents into account. We find that the complete network is not always the only pairwise stable one. The other stable networks have the realistic property that some firms drop out of the contest. Thus, ‘weak’ cooperation can serve as a barrier to entry on the market for innovation.