The paper investigates whether the market size of a regional trade agreement (RTA) is a determinant of foreign direct investment (FDI) received by countries participating in the RTA. This hypothesis is tested on a sample of 71 developing countries during the period 1980-99. Evidence is found that the RTA market size had a positive impact on the FDI received by member countries, even more so in the 1990s when such agreements were revived and became more widespread. The size of domestic population also seemed to matter, possibly because of its effect on the availability of the labor supply. It appears, however, that not all countries in the RTA benefited to the same extent from the RTA: countries with a relatively more educated labor force and/or a relatively more stable financial situation tended to attract a larger share of FDI at the expense of their RTA partners. This evidence suggests it is essential for all RTA countries to improve their business environment to the best available in the region. Finally, a partial negative correlation between the FDI received by RTA countries and that received by non-RTA countries possibly reflects a diversion of FDI from non-RTA to RTA countries. As an illustration, FDI benefits are simulated from the creation of a regional trade agreement between Algeria, Morocco, and Tunisia.