This paper analyzes the relationship between competition and R&D cooperation with universities and competitors. Our simple model predicts that more competitors reduce the incentives for horizontal cooperation as it diminishes the gains from collusion. Assuming that the value of synergies and spillovers created by cooperation depends on competition intensity reveals two distinct and opposing incentives for cooperation. While synergies foster R&D cooperation, spillovers may hinder cooperation. We mainly hypothesize that university cooperation corresponds to product innovation and hence quality competition, while horizontal cooperation lead to process innovations and therefore relates to price competition. We test these hypotheses based on Swiss firm-level panel data controlling for simultaneity of cooperation decisions and endogeneity of competition. Our empirical analysis supports the relevance of distinguishing between competition dimensions and cooperation partners, respectively. We find that price competition matters for both university and horizontal cooperation and it takes the form of an inverted U-shape. On the contrary, quality competition only matters for university cooperation and the relationship shows a U-form. Moreover we see that the number of principal competitors is significantly related only to cooperation between competitors and the relationship shows an inverted U-form. Hence, markets with a medium number of competitors are more receptive for horizontal cooperation. In sum these findings advance our understanding of the relationship between innovation and competition policy.