Purpose - The purpose of this paper is to provide a better understanding of the determinants of small and medium-sized enterprises (SME) financing constraints and their impacts on investments in innovation. To explicate these factors, the authors use a general definition of innovation, distinguishing between product and process innovations, and highlight the role played by banking relationships. Design/methodology/approach - On the basis of a literature review covering works specializing in innovation, financing constraints, and SME characteristics, a quantitative study is carried out in Spain, using a sample composed by 267 Spanish SMEs. Information was gathered by applying surveys addressed to the firm managers. Findings - The findings reveal that financing constraints hinder innovation among Spanish SMEs functioning in hostile environments, though long-term banking relationships can moderate these financing constraints. The longer the duration of a firm's banking relationship, the fewer financing constraints it faces, because the relationship significantly reduces information asymmetry. Practical implications - To reduce financing constraints on their innovation, SMEs should establish long relationships and low debt concentration with their main bank. The more banks a firm works with, the greater its financing constraints. The findings have managerial implications, not just for firms but also for government policymakers and providers of consulting services. Originality/value - This paper provides an in-depth analysis of the factors that affect innovation, along with insights into which financing constraints limit innovation during a severe recession.