Activist NGOs increasingly oppose industrial projects that have nevertheless been approved by public regulators. To understand this recent rise in NGO activism, we develop a theory of optimal regulation in which a regulated industry seeks to undertake a project that may be harmful to society. On the one hand, public regulation is vulnerable to the influence of the industry, and may approve the project even though it is harmful. On the other hand, an NGO may oppose the project. We characterize the circumstances under which NGO opposition occurs and the circumstances under which this opposition is socially beneficial. The theory is used to explain the role that NGOs have assumed in the last decades, and has implications for the legal status of NGO activism and the appropriate degree of transparency.