The energy transition from fossil fuels to alternative energy sources has important consequences for technological change and resource extraction. We examine these consequences by incorporating a nonrenewable resource and an alternative energy source in a market economy model of endogenous growth through expanding varieties. During the energy transition, technological progress is nonmonotonic over time: It declines initially, starts increasing when the economy approaches the regime shift, and jumps down once the resource stock is exhausted. A moment of peak-oil does no longer necessarily occur, and simultaneous use of the resource and the alternative energy source will take place if the return to innovation becomes too low. Subsidies to research and development (R&D) and to renewables production speed up the energy transition, whereas a tax on fossil fuels postpones the switch to renewable energy.