The excessive increase of leverage, i.e. the abuse of debt financing, is considered one of the primary factors in the default of financial institutions since it amplifies potential investment losses. On the other side, portfolio diversification acts to mitigate these losses. Systemic risk results from correlations between individual default probabilities that cannot be considered independent. Based on the structural framework by Merton (1974), we propose a model in which these correlations arise from overlaps in banks’ portfolios. Our main result is the finding of a critical level of diversification that separates two regimes: (i) a safe regime in which a properly chosen diversification strategy offsets the higher systemic risk engendered by increased leverage and (ii) a risky regime in which an inadequate diversification strategy and/or adverse market conditions, such as market size, market volatility and time horizon, cannot compensate the same increase in leverage. Our results are of relevance for financial regulators especially because the critical level of diversification may not coincide with the one that is individually optimal.