In this paper, we contribute to the literature on the determinants of foreign direct investment in developing countries and re-evaluate the role of the quality of institutions on FDI independently of the general level of development. We implement cross-section estimations based on a newly available database with unprecedented detail on institutions for a set of 52 countries, as well as panel data estimations based on Fraser Institute's data. Furthermore, we control for the correlation between institutions and GDP per capita and for endogeneity of institutions. Finally, we evaluate whether the similarity of institutions between the host and the origin country raises bilateral FDI. We find that a wide range of institutions, including bureaucracy, corruption, but also information, banking sector and legal institutions, do matter for inward FDI independently of GDP per capita. Interestingly, weak capital concentration and strong employment protection tend to reduce inward FDI. Institutional proximity between the origin and the host country also matters, but we find little impact of institutions in the origin country. These results are encouraging in the sense that efforts towards raising the quality of institutions and making them converge towards those of source countries may help developing countries to receive more FDI, independently of the indirect impact of higher GDP per capita. The orders of magnitude found in the paper are large, meaning that moving from a low level to a high level of institutional quality could have as much impact as suddenly becoming a neighbour of a source country.