Industry compliance with pollution regulations is far from universal, even in North America. In developing countries, compliance rates are often quite low, particularly where budgets for regulation are low or inspectors are corrupt. And strictness of enforcement varies. Regulators are reluctant to impose stiff penalties on financially strapped plants that are major employers, and in many developing countries state-owned plants are treated more leniently than their private-sector counterparts. But research on determinants of compliance and enforcement is rare, even in industrial societies. The authors use new plant-level data for China to analyze variations in both compliance and enforcement, with a focus on regulation of water pollution. They look at the mechanics of official regulation, the economics of compliance, and regulatory discretion. They find: Cost-sensitive plants will try to adjust emissions to the point where the marginal levy equals the marginal cost of abatement. In practice, local regulators have considerable discretion in judging both compliance and appropriate penalties for noncompliance. China's regulators play by the rules, but often bend them. Underreporting and underassessment are common in China. But variable regulation is systematic, not random, and seems to reflect important environmental and social concerns. Old factories pay more, state-owned factories pay higher rates, and big employers get a discount. And regulators give little or no slack to heavy dischargers.