Much of the time, polluting firms lobby against environmental protection, but there are major exceptions to this rule, for example in the regulation of both ozone and greenhouse gases. Political support from firms can be pivotal for governments trying to protect the environment. I offer an explanation for this phenomenon, suggesting firms behave as they do in order to steal market share from their rivals. I develop a model in which a polluting firm makes a clean technology investment and then lobbies successfully for strong environmental protection, since this will shift market share away from its rival who has not made the clean investment. The key result concerns the impact of lobbying on the equilibrium outcome: for a region of the parameter space, it is only because of firms' lobbying that environmental protection is achieved. This is because lobbying increases a firm's returns to going green, by increasing the market share it can steel. The net effect of this distortion is an increase in welfare.