We study the determinants of the extent of outsourcing and of direct foreign investment in an industry in which producers need specialized components. Potential suppliers must make a relationship-specific investment in order to serve each prospective customer. Such investments are governed by imperfect contracts. A final-good producer can manufacture components for itself, but the per-unit cost is higher than for specialized suppliers. We consider how the size of the cost differential, the extent of contractual incompleteness, the size of the industry, and the relative wage rate affect the organization of industry production.