We develop a model of the joint capital structure decisions of banks and their borrowers. Strikingly high bank leverage emerges naturally from the interplay between two sets of forces. First, seniority and diversification reduce bank asset volatility by an order of magnitude relative to that of their borrowers. Second, previously unstudied supply chain effects mean that highly levered financial intermediaries can offer the lowest interest rates. Low asset volatility enables banks to take on high leverage safely; supply chain effects compel them to do so. Firms with low leverage also arise naturally, as borrowers internalize the systematic risk costs they impose on their lenders. Because risk assessment techniques from the Basel framework underlie our model, we can quantify the impact capital regulation and other government interventions have on leverage and fragility. Deposit insurance and the expectation of government bailouts increase not only bank risk taking, but also borrower risk taking. Capital regulation lowers bank leverage but can lead to compensating increases in the leverage of borrowers, which can paradoxically lead to riskier banks. Doubling current capital requirements would reduce the default risk of banks exposed to high moral hazard by up to 90%, with only a small increase in bank interest rates.