An important characteristic of the role of foreign trade in the technological catch-up of countries is the complementary nature with technological change, human capital development and local R&D efforts. Using cointegration techniques, evidence based on Portuguese long-run growth suggests that by investing in certain capacity-building activities, namely human capital and local R&D efforts, countries can improve their ability to identify, value, assimilate, and apply (or exploit) knowledge that is developed in other (more developed) countries. Although human capital has a stronger direct impact on total factor productivity than internal R&D efforts, the latter's indirect impact, by means of machinery and equipment imports, is tremendous. Trade also emerges as a powerful direct contributor to long-term total factor productivity, especially in its embodied form, through the acquisition of advanced machinery and equipment from more developed countries. The (smaller) productivity enhancing effect of licenses and FDI seems to be strongly dependent on institutional circumstances, namely those related to human capital investments and incentives.