We develop a new tractable model of banks' liquidity management and the credit channel of monetary policy. Banks finance loans by issuing demand deposits. Because loans are illiquid, deposit transfers across banks must be settled with reserves. Deposit withdrawals are random, and banks manage liquidity risk by holding a precautionary buffer of reserves. We show how different shocks affect the banking system by altering the trade-off between profiting from lending and incurring greater liquidity risk. Through various tools, monetary policy affects the real economy by altering that trade-off. In a quantitative application, we study the driving forces behind the decline in lending and liquidity hoarding by banks during the 2008 financial crisis. Our analysis underscores the importance of disruptions in interbank markets followed by a persistent decline in credit demand.