This paper studies the patterns of internal liquidity management and their effect on bank lending, using a novel branch-level dataset of Brazilian banks. Our results suggest that internal liquidity management increases during times of financial stress. Privately owned banks are most affected by a liquidity shock and increase the level of internal funding to maintain their branch lending, while their government-owned competitors react strategically. Private and government banks increase the funding of branches in concentrated and riskier areas. This funding translates into more lending, as the sensitivity of lending to internal funding remains high after the liquidity shock. Altogether, this paper provides branch-level evidence of the way that banks ration internal liquidity, both in normal times and in times of stress, and the effect this has on bank lending.