For the mitigation of long-term pollution threats, one must consider that both the process of environmental degradation and the switchover to new and cleaner technologies are dynamic. We develop a model of a uniform good that can be produced by either a polluting technology or a clean one; the latter is more expensive and requires investment in capacity. We derive the socially optimal pollution stock accumulation and creation of nonpolluting production capacity, weighing the tradeoffs among consumption, investment, and adjustment costs, and environmental damages.We consider the effects of changes in the pollution decay rate, the capacity depreciation rate, and the initial state of the environment on both the steady state and transition period. The optimal transition path looks quite different with a clean or dirty initial environment. With the former, investment is slow and the price of pollution may overshoot the long-run optimum before converging. With the latter, capacity may overshoot.