In this paper, we analyze the problem of endogenous R&D timing when technological breakthrough and innovation are random events in a dynamic framework which involves the substitution of an exhaustible resource (oil, for instance) by an alternative technology (the backstop) that provides an everlasting source of energy. Under fairly general assumptions, we characterize the pattern of exploitation of both energy sources and study the effect of uncertain technological breakthrough on the R&D timing decision, on resource prices, and on the pattern of resource use. In comparison to the certainty case, it is shown that uncertainty consideration might delay the undertaking of R&D and might lead to a more rapid resource depletion pattern for a considerable range of R&D capital costs, while the opposite result - the conventional wisdom - holds only for some other range.