**1. Introduction**

Electricity is regarded as a fundamental commodity in modern societies. The availability of this energy vector is inextricably associated with economic prosperity, social progress and human development [1]. It is in this spirit that access to electricity has been incorporated into the Sustainable Development Goals (SDGs) (see Goal 7: Affordable and clean energy) defined under the much-acclaimed United Nations (UN) Agenda 2030 [2].

However, the deployment, operation and decommissioning of the infrastructures required to provide this essential service may generate substantial impacts (both positive or negative) on the sustainability of the natural and human environment. For instance, the industrial and commercial activity associated with the life cycle of a power plant (construction, operation, extraction and processing of fuels, decommissioning) will surely contribute to economic growth and job creation [3,4]. These actions will also be responsible for the deterioration of the surrounding environment, the magnitude of which would depend primarily on the generation technologies employed and the overall demand. These detrimental effects would be observed in impact categories such as global warming, acidification, toxicity and consumption of natural resources, to name a few. The nature and extent of these types of impact largely depend on the type of generation technology and energy source utilized [5–7].

Most countries around the world are currently involved in a profound transformation of their electricity systems. Over the last decade, Spain has been adapting to the requirements set by the European Union (EU) under the Renewable Energy Directive 2009/28/EC [8] and also to the responsibilities agreed to in the ongoing EU climate action plans [9]. In this context, the targets set under the 2020 Climate And Energy Package have given way to the more ambitious 2030 Climate and Energy Framework whose objectives include a 40% cut in greenhouse gas emissions (from 1990 levels), a 32% share for renewable energy and a 32.5% improvement in energy efficiency. The long-term European strategy for this transition is gradually starting to come to light in documents like A Clean Planet for All [10].

This transition towards a reduction in the use of fossil fuels and the promotion of local renewable energy sources has environmental, economic and geostrategic roots. The main environmental driver is the need to reduce greenhouse gas emissions (GHG) so as to avoid irreversible changes in the Earth's climate [11]. The uncertainty associated with the volatility of fossil fuel prices and the benefits from the opportunities generated by a progressive reduction in the cost of renewable energies are the two main economic drivers of such plan. This is reinforced by political instability of major producers of fossil resources (e.g., Venezuela, Persian Gulf and Arabian Peninsula, etc.) and the strategic inconveniences of energy dependency [12].

These changes in the total output and configuration of the electricity systems determine not only their environmental sustainability but also their socio-economic and economic performance. All these aspects need to be evaluated in order to understand the true consequences that these changes may bring about, so that positive aspects may be maximized while negative impacts may be prevented, attenuated or compensated. Historic assessments provide a perspective on time as to the evolution of indicators, identifying trends which contextualize the present situation and the future scenarios.

The sustainability of electricity sectors has been carried out in other countries including Mexico [13], United Kingdom [14], Australia [15], Mauritius [16] and Turkey [17]. These investigations vary in terms of the scope considered when evaluating sustainability (only environmental or including economic and social components) and also in terms of the time extension (past, present and future projections).

The main objective of this paper was to evaluate the sustainability of Spain's electricity system. This assessment includes an investigation of historic data (since 1990) and future projections (2030 and 2050), which set a framework in which the current situation may be more adequately appraised. This transformation is evaluated on the basis of a series of indicators that describe the environmental, economic and socio-economic dimensions of the sustainability.
