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.