This paper studies the role of a lender of last resort (LLR) in a monetary model where a shortage of bank's monetary reserves (or a banking panic) occurs endogenously. We show that while a discount window policy introduced by the LLR is welfare improving, it reduces the banks' ex ante incentive...