Pollution from fossil fuel use is a global problem. Studies have shown that a worsening of environmental quality has adverse effects on worker productivity and health. In this study, there is an inexhaustible natural resource that deteriorates environmental quality and affects productivity. There also exists a perfect substitute clean backstop, which is initially too costly to operate and whose costs can be reduced through investments in knowledge. Depending on the endowment of environmental quality, the optimal solution shows that the planner should only use the resource or only the backstop until a constant steady state is reached in which the polluting resource and backstop are used in fixed proportions. We show that investments in alternative technologies from the very beginning can help an economy make the eventual switch to clean energy sources, thereby attaining better environmental quality.