Optimal climate policy is investigated in a Ramsey growth model of the global economy with exhaustible oil reserves, an infinitely elastic supply of renewables, stock-dependent oil extraction costs, and convex climate damages. Four regimes can occur, depending on the initial social cost of oil being larger or smaller than that of renewables and depending on the initial oil stock being large or small. We also offer some policy simulations for the first and second regime, which illustrate that with a lower discount rate more oil is left in situ and renewables are phased in more quickly. We identify the conditions under which the optimal carbon tax rises or decreases. Subsidizing renewables (without a carbon tax) induces more oil to be left in situ and a quicker phasing in of renewables, but oil is depleted more rapidly initially. The net effect on global warming is ambiguous.