When is financial repression—namely, policies that force banks to hold government debt—optimal? With commitment, such policies are never optimal because they crowd out banks’ productive investments. Without commitment, they are optimal when governments need to issue unusually large amounts of debt, such as during wartime. In such times, repression allows governments to credibly issue more debt. Repression increases credibility because when banks hold government debt, defaults dilute net worth, reduce investment, and are thus costly ex post. Forcing banks to hold debt endogenously increases these ex post costs but has ex ante costs because doing so crowds out investments.