This paper uses loan-level transactions from the Paycheck Protection Program (PPP) to understand how a bank’s decision to borrow funds from the discount window (DW) affected its lending behavior during the COVID-19 crisis. Implementation of the PPP can be seen as an exogenous shock to the liquidity demand for banks, independent of their financial conditions. By exploiting this independence, we find a causal relationship between use of DW and the number of PPP loans extended by large banks but not small banks. While both types used the DW in the absence of a long-term funding source, usage of the DW almost doubled PPP lending for large banks. After the establishment of a long-term funding source, however, this effect was reduced to 69% due to substitution away from the DW. These findings suggest that in the presence of an unexpected liquidity shock, the DW plays a critical role in extending short-term liquidity to the banking sector.