The energy industry is facing substantial challenges that require innovation to be fostered. Nevertheless, levels of R&D investment and innovation remain quite low in comparison with other sectors. In this paper we analyse the main drivers of R&D investment and obstacles to innovation in the energy industry. We examine, firstly, whether the stated R&D objectives pursued by firms play a role in their R&D effort. Secondly, we analyse the effects of financial, knowledge and market barriers on the innovation outcomes of the firms. We rely on data from the Technological Innovation Panel (PITEC) for Spanish firms for the period 2003-2010. We use a structural model with three equations corresponding to the decision to carry out R&D or not, the R&D effort and the production of innovations. The results of the econometric estimations show, first, that R&D intensity is positively related to process innovation. Second, the main barriers that hamper innovation in the energy industry are related to market factors while financial and knowledge obstacles are not significant.