I propose a novel general equilibrium framework to quantify the impact of law enforcement on the internal organization of firms and thereby on aggregate outcomes. The model features an agency problem between the firm and its middle managers. Imperfect law enforcement allows middle managers to divert revenue from firms, which reduces delegation and constrains firm size. I use French matched employer-employee data for evidence of the model’s pattern of managerial wages. Relative to the French benchmark economy, reducing law enforcement to its minimum value decreases GDP (equivalently, TFP) by 23 percent and triples the self-employment rate. Consistent with the model, I document cross-country empirical evidence of a positive correlation between law enforcement indicators and the aggregate share of managerial workers. Mapped across the world, the model explains 3 to 6 percent of the ratio in GDP per worker between the poorest and richest quintile of countries, and 6 to 11 percent of their TFP ratio.