We develop a microeconomic model of endogenous growth where clean and dirty technologies compete in production and innovation-in the sense that research can be directed to either clean or dirty technologies. If dirty technologies are more advanced to start with, the potential transition to clean technology can be di¢ cult both because clean research must climb several rungs to catch up with dirty technology and because this gap discourages research e¤ort directed towards clean technologies. Carbon taxes and research subsidies may nonetheless encourage production and innovation in clean technologies, though the transition will typically be slow. We characterize certain general properties of the transition path from dirty to clean technology. We then estimate the model using a combination of regression analysis on the relationship between R&D and patents, and simulated method of moments using microdata on employment, production, R&D, …rm growth, entry and exit from the US energy sector. The model's quantitative implications match a range of moments not targeted in the estimation quite well. We then characterize the optimal policy path implied by the model and our estimates. Optimal policy makes heavy use of research subsidies as well as carbon taxes. We use the model to evaluate the welfare consequences of a range of alternative policies. JEL Classi…cation: O30, O31, O33, C65.