The renewable energy transition depends heavily on capital structure decisions of energy firms. Most previous research has focused on the decisions of oil companies. This study investigates the financing of new investment in the Spanish renewable energy sector, including decisions about: i) equity versus debt, ii) short versus long-term debt, and iii) equity issuances versus retained earnings for new investment. Our analysis is based on data from over 22,000 energy firms from 2008 to 2021 and shows that these firms prefer debt over equity (more than 90% of changes in assets are financed through increasing debt) and have extended the term of the debt over the period studied (reaching a maximum of almost 73% long-term debt in 2021). The deployment of retained earnings is less usual than raising new equity capital. Our analysis points to a generalized use of project finance to support new investments. Policymakers should focus on increasing financing through equity and thus diversifying the financial risk of the energy transition. In addition, a supportive fiscal policy and a stable regulatory environment are desirable for achieving this goal.