Medieval and early modern craft guilds were rent-seeking coalitions of local producers that controlled markets at the expense of society as well as market-enhancing organizations that reduced the high transaction costs associated with pre-modern industries. This article presents an economic analysis of this seemingly contradicting behavior. The proposed argument is simple. Obtaining a market privilege guaranteed guild members extra rents while increasing the cost of losing membership, which motivated greater collective action within the organization. The ability to punish free-riders and enforced cooperation was used to overcome the problems brought by the transition from kin to market economy.