We analyze the effect of bank capital requirements on the structure and risk of a financial system where markets, regulated banks, and shadow banks coexist. Banks face a moral hazard problem in screening entrepreneurs' projects, and they choose whether to be regulated or not. If regulated, a supervisor certifies their capital; if not, they have to rely on more expensive private certification. Under both risk-insensitive and risk-sensitive requirements, safer entrepreneurs borrow from the market and riskier entrepreneurs borrow from banks. But risk-insensitive (sensitive) requirements are especially costly for relatively safe (risky) entrepreneurs, which may shift from regulated to shadow banks.