This paper empirically characterizes relationship lending using data from more than 20,000 loans of a Spanish bank to small and medium enterprises (SMEs). The study analyzes the pricing determinants of loans to firms based on the entire previous bank-firm relationship, allowing for the identification of non-linear pricing patterns in the bank-firm relationship. We show that firms only start capitalizing the gains of relationship lending when the relationship extends beyond two years. This reduction in the loan rate spread charged is driven by the opaque firms, for which the acquisition of "soft" information is especially relevant. Finally, we find that relationship lending significantly mitigates the increased costs of refinancing loans along two dimensions: relationship duration and having additional contracts-other than loans-with the bank. (C) 2016 Elsevier Inc. All rights reserved.