We derive the optimal labor contract for a levered firm in an economy with perfectly competitive capital and labor markets. Employees become entrenched under this contract and so face large human costs of bankruptcy. The firm’s optimal capital structure therefore depends on the trade-off between these human costs and the tax benefits of debt. Optimal debt levels consistent with those observed in practice emerge without relying on frictions such as moral hazard or asymmetric information. Consistent with empirical evidence, persistent idiosyncratic differences in leverage across firms also result. In addition, wages should have explanatory power for firm leverage.