This paper introduces endogenous and directed technical change in a growth model with environ- mental constraints. A unique Önal good is produced by combining inputs from two sectors. One of these sectors uses ìdirtyîmachines and thus creates environmental degradation. Research can be directed to improving the technology of machines in either sector. We characterize dynamic tax policies that achieve sustainable growth or maximize intertemporal welfare. We show that: (i) in the case where the inputs are sufficiently substitutable, sustainable long-run growth can be achieved with temporary taxation of dirty innovation and production; (ii) optimal policy involves both "carbon taxes" and re- search subsidies, so that excessive use of carbon taxes is avoided; (iii) delay in intervention is costly: the sooner and the stronger is the policy response, the shorter is the slow growth transition phase; (iv) the use of an exhaustible resource in dirty input production helps the switch to clean innovation under laissez-faire when the two inputs are substitutes. Under reasonable parameter values and with sufficient substitutability between inputs, it is optimal to redirect technical change towards clean technologies immediately and optimal environmental regulation need not reduce long-run growth.