We develop a theory of optimal government debt in which publicly-issued and privately-issued safe assets are substitutes. While government bonds are backed by future tax revenues, privately-issued safe assets are backed by the future repayment of pools of defaultable private loans. We find that a higher supply of public debt crowds out privately-issued safe assets less than one for one and reduces the interest spread between borrowing and deposit rates. Our main result is that the optimal level of public debt does not fully crowd out private lending and maintains a positive interest spread. Moreover, the optimal level of public debt is higher the more severe arefinancial frictions.