Production efficiency and financial stability do not necessarily go hand in hand. With heterogeneity in banks’ abilities to screen borrowers, the market for loans becomes segmented and a self-competition mechanism arises. When heterogeneity increases, the intensive and extensive margins have opposite effects. Bank informational rents unambiguously decrease welfare and distort effort incentives. But the bank most efficient at screening expands its market share by competing against itself to offer effort-inducing contracts, which decreases the share of non-performing loans. A macroprudential authority acting alone reinforces this tension. Optimality is restored by targeting lending policies toward borrowers with intermediate abilities.