This paper combines the theory of optimal extraction of exhaustible resources with the theory of greenhouse externalities, to analyse problems of global warming when the supply side is considered. The optimal carbon tax will initially rise but eventually fall when the externality is positively related to the stock of carbon in the atmosphere. It is shown that the tax will start falling before the stock of carbon in the atmosphere reaches its maximum. If, on the other hand, the greenhouse externality depends on the rate of change in the atmospheric stock of carbon, the evolution of the optimal carbon tax is more complex. It can even be optimal to subsidise carbon emissions to avoid future rapid changes in the stock of carbon, and therefore future damages. If the externality is related to the stock of carbon in the atmosphere and there exists a non-polluting backstop technology, it will be optimal to extract and consume fossil fuels even when the price of fossil fuels is equal to the price of the backstop. The total extraction is the same as when the externality is ignored, but in the presence of the greenhouse effect, it will be optimal to slow the extraction and spread it over a longer period.