We develop a model of a small open economy with credit market frictions to analyze the consequences of capital account liberalization. We show that financial opening facilitates the inflows of cheap foreign funds and improves production efficiency. However, capital account liberalization has important distributional consequences. Specifically, it may be impossible to use public transfers to fully compensate the loss of those who are negatively affected by capital account liberalization. This explains why financial opening often meets fierce opposition even though it leads to efficiency gains for the economy as a whole. From a practical perspective, capital controls should be lifted gradually for a smooth transition.