Primary energy consumption in Spain in 2015 was mainly composed of fossil fuels. The largest sources are petroleum (42.3%), natural gas (19.8%) and coal (11.6%). The remaining 26.3% is accounted for nuclear energy (12%) and different renewable energy sources (14.3%). Domestic production of primary energy includes nuclear (44,8%), solar, wind and geothermal (22,4%), biomass and waste (21,1%), hydropower (7,2%) and fossil (4,5%).
According to The World Factbook, in 2011 Spain produced 276.8 TWh of electricity. In the same year, Spain consumed only 249.7 TWh of electricity. In the early 2000s, huge investment has been made into Spain's renewable energy industry. Spain aims to be carbon-free before 2050. According to Red Electrica de España (REE), the Spanish peninsula got 69 percent of its electricity generation in March 2015 from technologies that produce zero carbon emissions (renewable energy and nuclear power). Nuclear as a whole provided 23.8 percent of the country's electricity in March, while 47 percent came solely from renewable sources. Most of the renewable electricity being generated in Spain comes from wind, which alone provided 22.5 percent of the country's electricity in April 2015. Wind often competes with nuclear for the title of Spain's top electricity generation source overall — in fact, though nuclear pulled through in March 2015 as the top source of electricity, wind has overall provided more electricity to Spain in the entirety of 2015. From January to March 2015, according to REE, wind provided 23.7 percent of electricity generation while nuclear made up 22.7 percent.
The energy sector accounts for approximately 2.5% of Spain GDP. One of the factors which has limited the economic development of Spain throughout history has been the relative scarcity of energy resources. While Spain does have its own hydrocarbon (liquid and gas) resources, their quantity is far too low to meet demand. In addition, there has been a low quality in the available coal (even though the Central Asturian Carboniferous Basin is quite large). The energy dependency rate stood at 81,4% in 2005 and 73,3% in 2015. This deficit rate is higher than in the EU(28): 2005 (52,1%) and 2015(54%).
| Mtoe = 11.63 TWh. Prim. energy includes energy losses that are 2/3 for nuclear power
2012R = CO2 calculation criteria changed, numbers updated
Main article: Renewable energy in Spain
Spain has long been a leader in renewable energy, and has recently become the first country in the world to have relied on wind as its top energy source for an entire year. The country is attempting to use wind power to supply 40 percent of its electricity consumption by 2020. At the same time, Spain is also developing other renewable sources of energy, particularly solar photovoltaic.
Though it currently[when?] only accounts for about 3 percent of electricity generation, Spain's solar industry is one of the largest in the world, according to Al Jazeera. In 2012, it reported that solar power accounted for almost 2,000 MW. Comparatively in the United States, there were 3,313 MW of solar photovoltaic installations that same year.
Though the U.S. may have more solar cumulatively, Spain's solar makes up more of the smaller country's electricity use as a whole. In 2013, solar accounted for about 0.2 percent of the net electricity produced in the United States, according to the Institute for Energy Research. That same year, solar accounted for 3.1 percent of Spain's total electricity, according to REE.
Spain's renewable energy story hasn't been all good news. The country's aggressive goals have been heavily subsidized by its government, and the government has fallen into economic distress as a result. Specifically, the New York Times reported in 2013 that Spain's tariff deficit had built up a cumulative debt of about €26 billion ($35 billion). Since then, however, the country has slashed its subsidies, putting the bulk of costs back on the power utilities themselves.
The subsidy cuts happened last summer,[which?] and since then renewable energy has not significantly grown in the country as a whole. But it has grown substantially in at least one part of Spain — the tiny island of El Hierro, which is nearing its goal to be powered 100 percent by wind and water.
Main article: Nuclear power in Spain
Algeria is Spain's largest natural gas supplier. Amid the deterioration of relations with Morocco, Algeria decided not to renew the contract of the Maghreb–Europe Gas Pipeline (GME), which expired at midnight on 31 October 2021. From November 1 on, natural gas exports to Spain are primarily transported through the Medgaz pipeline (with the short-term possibility of covering further demand either by expanding the Medgaz or by shipping LNG).
Main article: Global warming
According to Energy Information Administration the CO2 emissions from energy consumption of Spain were in 2009 360 Mt, below Italy 450 Mt and France 429 Mt and above Poland 295 Mt and the Netherlands 250 Mt. The emissions tonnes per capita were in Spain 7.13, Italy 7.01 France 6.3 Poland 7.43, and the Netherlands 14.89.