This paper provides a framework for addressing the question of when transactions should be carried out within a firm and when through the market. Following Grossman and Hart, we identify a firm with the assets that its owners control. We argue that the crucial difference for party 1 between owning a firm (integration) and contracting for a service from another party 2 who owns this firm (nonintegration) is that, under integration, party 1 can selectively fire the workers of the firm (including party 2), whereas under nonintegration he can "fire" (i.e., stop dealing with) only the entire firm: the combination of party 2, the workers, and the firm's assets. We use this idea to study how changes in ownership affect the incentives of employees as well as those of owner-managers. Our frame- work is broad enough to encompass more general control structures than simple ownership: for example, partnerships and worker and consumer cooperatives all emerge as special cases.