We study the optimal carbon tax in an economy in which climate change, stemming from polluting nonrenewable resource, affects the economy's growth potential. Our main contribution is to introduce and explore the natural time lag of the climate system between emissions and damages to capital accumulation in an endogenous growth setting. This allows us to investigate how optimal climate policy, and its interplay with climate dynamics, affect long-run growth and the transition of the economy towards it. Without pollution decay, a higher speed of emissions diffusion steepens the growth profile of the economy. With pollution decay, this leads to lower short-run but higher long-run economic growth during transition. Poor understanding of the emissions diffusion process leads to suboptimal carbon taxes, resource extraction and growth.