Renewable energy generation and storage requires specialized capital goods, embedding critical raw materials (CRM). The scarcity of CRM therefore affects the transition from a fossil based energy system to one based on renewables, necessary to cope with climate change. We consider the issue in a theoretical model, where we allow for a very costly potential substitute, reflecting a backstop technology, and for partial and costly recycling of materials in capital goods. We characterize the main features of the efficient energy transition, and their dependence on the relative abundance of CRM and on the recycling technology. Recycling reduces the cost of the transition. It also calls for having a large stock of recyclable CRM embedded in specialized capital at the time of adoption of the backstop technology. Moreover, we consider constraints on policy tools and myopic regulation, and show how abstracting from the scarcity of CRM, or tightly linking subsidies for renewables to the carbon tax revenue, is misleading in designing climate policy.