Access to core deposits insulates a bank's costs of funds from exogenous shocks, allowing the bank to insulate its borrowers against exogenous credit shocks. The authors find that, controlling for competitive conditions in loan markets, banks funded more heavily with core deposits provide more smoothing of loan rates in response to exogenous changes in aggregate credit risk. This suggests that a distinctive feature of bank lending is that firms and banks form multiperiod lending relationships in which loans need not break even period by period. It also partially explains the declining share of bank loans (or near substitutes for bank loans) in credit markets. As banks have increasingly been forced to pay market rates for an increasing share of their funds, multiperiod relationship lending has become increasingly less feasible and bank loans have lost some of their comparative advantage over securities. The authors' results suggest that access to core deposits is one of the foundations of relationship lending.