We analyze firms' decisions on their vertical organization, taking into account the characteristics of both the final good competition and the R&D process. We consider two vertical chains, where upstream sectors invest in R&D. Such investment determines the production costs of the downstream sector and has spillovers on the production and the investment costs of the rival. In a general setting, we show that the equilibrium organizational structure depends on whether the situation considered belongs to one of four possible cases. We study how final good market competition, R&D spillover, and R&D incentives interact to determine the equilibrium vertical structure.