Evidence on international capital flows suggests that foreign direct investment (FDI) is less volatile than other financial flows. To explain this finding, I model international capital flows under the assumptions of imperfect enforcement of financial contracts and inalienability of FDI. Imperfect enforcement of contracts leads to endogenous financing constraints and the pricing of default risk. Inalienability implies that it is not as advantageous to expropriate FDI relative to other flows. These features combine to give a risk sharing advantage to FDI over other capital flows. This risk sharing advantage of FDI translates into a lower default premium and lower sensitivity to changes in a country's financing constraint. The model offers the new implication that financially constrained countries should borrow relatively more through FDI. This is because FDI is harder to expropriate and not because FDI is more productive or less volatile. Using several creditworthiness and country risk ratings to measure financing constraints, I present new evidence linking FDI and financing constraints. Moreover, numerical simulations of the model generate stronger serial correlation for FDI than for other flows into developing countries. This corroborates the view that non-FDI flows are more short-term and more likely to change direction.