This paper studies the effects of sterilized foreign exchange market intervention in an open-economy model with financial frictions and imperfect capital mobility. The central bank operates a managed float regime and issues sterilization bonds that are imperfect substitutes (as a result of economies of scope) to investment loans in bank portfolios. Sterilized intervention can be expansionary through a bank portfolio effect and may therefore raise financial stability risks. The model is parameterized and used to study the macroeconomic effects of, and policy responses to, capital inflows associated with a transitory shock to world interest rates. The results show that the optimal degree of exchange market intervention is more aggressive when the central bank can choose simultaneously the degree of sterilization; in that sense, the instruments are complements.