The role of movements in real rates in explaining the relationship between long- and short-term interest rates is explored within a model of optimal government debt management. The government's incentives to resort in the future to inflation and ex post debt taxation in order to reduce the real value of its nominal liabilities have an impact on term premia and hence on the short–long spread. In particular, default risk and, consequently, long-term interest rates increase with the size of outstanding debt and the level of real rates; in the presence of short maturities, indexed debt and anti-inflationary governments. Optimal maturity either lengthens or shortens with inflation risk, depending on the time profile of government expenditure, while it always lengthens with default risk. However, when the stock of debt is extremely large the compensation for default risk required by the agents on long-term bonds may be so high that only short-term debt can be issued. The implications of this model are consistent with the observed behavior of risk premia in some highly indebted countries.