We study the effects of credit rationing on research and development (R&D) investment using survey and accounting data on a large representative sample of manufacturing small- and medium-sized enterprises (SMEs). Our econometric model accounts for the endogeneity of our credit rationing indicator and employs an innovative theory-based identification strategy. We find that credit rationing has a significantly negative effect on both the probability to set up R&D activities and on the level of R&D spending (conditioned on the R&D decision), but the overall estimated reduction in R&D spending is largely to be associated with the first effect. (JEL G21, D82, O32, C35)