This paper examines banks' provision of liquidity to depositors and provision of loans. The problem identified is that banks may not be able to provide new funds for borrowers who are short of cash, because either the return on investments is poor, or because depositors withdraw more funds than expected. Banks subject to liquidity shortages may ration loans to good borrowers. This problem is shown to depend upon the nature of the deposit contract and banks' inability to issue subordinated deposits. State contingent renegotiation of loans and matching of the duration of project returns and investment needs mitigates the problem.