We examine the effect of air quality regulation on productivity in some of the most heavily regulated manufacturing plants in the United States, the oil refineries of the Los Angeles (South Coast) Air Basin. We use direct measures of local air pollution regulation to estimate their effects on abatement investment. Refineries not subject to these regulations are used as a comparison group. We study a period of sharply increased regulation between 1979 and 1992. Initial compliance with each regulation cost $3 million per plant and a further $5 million to comply with increased stringency. We construct measures of total factor productivity using Census of Manufacturers output and materials data that report physical quantities of inputs and outputs for the entire population of refineries. Despite high costs associated with the local regulations, productivity in the Los Angeles Air Basin refineries rose sharply between 1987 and 1992, which was a period of decreased refinery productivity in other regions. We conclude that abatement cost measures may grossly overstate the economic cost of environmental regulation as abatement can increase productivity.