In this paper, we investigate the location determinants of Spanish multinational firms in developing and transition economies. We pay particular attention to the role played by market potential and agglomeration economies as decisive factors in location. We also analyze whether, beyond the observed attributes, there are any significant differences across regions in terms of attracting foreign affiliates. With this aim, we estimate a mixed logit model, which allows us to endogenously consider the existence of complex substitution patterns among different destinations. Our results confirm that Spanish investment in developing and transition countries depends on market potential and agglomeration externalities. The intensity of these externalities, however, depends on the nationality of competitors, greater rivalry being observed among Spanish‐owned affiliates. Furthermore, our findings show that the location of multinational firms responds both to factors related to the local business environment, including the cost and quality of labor and infrastructures, and to the existence of specific regional effects.