This article introduces a quantitative measure of trade policy space at the national level, and investigates empirically whether it influences foreign direct investment (FDI) flows to countries. The empirical analysis covers an unbalanced panel dataset of 158 countries (both developed and developing countries), over the period 1995-2015, and uses the two-step system Generalized Methods of Moments (GMM) approach. Results suggest that the impact of trade policy space on FDI inflows is positive and increases as countries enjoy greater trade policy space. Furthermore, advanced economies tend to experience a higher positive impact of trade policy space on FDI inflows than less advanced economies. Overall, trade policy space matters significantly for countries' FDI inflows.