This paper introduces endogenous and directed technical change in a growth model with environmental constraints. The final good is produced from dirty and clean inputs. We show that: (i) when inputs are sufficiently substitutable, sustainable growth can be achieved with temporary taxes/subsidies that redirect innovation toward clean inputs; (ii) optimal policy involves both carbon taxes and research subsidies, avoiding excessive use of carbon taxes; (iii) delay in intervention is costly, as it later necessitates a longer transition phase with slow growth; and (iv) use of an exhaustible resource in dirty input production helps the switch to clean innovation under laissez-faire.