This article argues that medieval craft guilds emerged in order to provide transferable skills through apprenticeship. They prospered for more than half a millennium because they sustained interregional specialized labor markets and contributed to technological invention by stimulating technical diffusion through migrant labor and by providing inventors with temporary monopoly rents. They played a leading role in preindustrial manufacture because their main competitor, rural putting out, was a net consumer rather than producer of technological innovation. They finally disappeared not through adaptive failure but because national states abolished them by decree.