We model an economy in which domestic banks and firms face incentive constraints, as in Holmstrom and Tirole (1997). Firms borrow from banks and uninformed investors, and can collude with banks to reduce the intensity of monitoring. We study the general equilibrium effects of capital flows (portfolio investments and loans, FDI) on the governance of domestic banks. We find that liberalization of capital flows may deteriorate the governance of the domestic financial system by increasing firms' incentives to collude with banks, with negative effects on productivity. We also show that systemic bailout guarantees increase the risks of collusion.