I study the role of bank-firm lending relationships in determining the aggregate effects of credit supply shocks. I show two facts using a unique dataset. First, the loan balance between a lender-firm pair increases in the length of the lending relationship. Second, loan balances of longer relationships respond less to lender-level credit supply shocks. I interpret these findings using a competitive search model of credit markets. Banks write optimal lending contracts subject to firms’ limited commitment that prescribe increasing lending over time to incentivize firms to stay in the relationship. I calibrate the model to match features of the data including the slope of relationship lending with respect to the relationship length. Then I validate the calibrated model by showing that, as in the data, the responsiveness of a relationship’s loan balance to bank-level credit supply shocks is decreasing in the relationship length. Finally, I perform a counterfactual exercise to show how the aggregate impact of a credit supply shock depends on the distribution of relationship lengths across bank-firm pairs.