But experts say green issues have not been a priority in the country, which has a poor environmental track record.
Only 2.3 percent of all Spaniards consider the environment as one of the country's main problems, according to the latest survey by the state-run Centre for Sociological Studies (CIS).
That compares to 56.9 percent who listed unemployment and 21.2 percent who said corruption were major concerns.
Like other southern European nations, Spain does not have a significant green party and environmental issues were not in focus during the campaign for the November 10 general election.
They were not even among the themes addressed during the only TV debate held before the polls.
“Environmental problems are not a priority in the political agenda,” said Claudio Cattaneo, an environmental sciences professor at the Autonomouns University of Barcelona.
“Social inequalities are very high in Spain so the political demands (of the left) are more oriented towards the right to housing than to ecology.”
The environment accounted for just 0.44 percent of the debate in parliament between 2011 and 2016, according to a tally kept by the Spanish Society of Ornithology, an NGO dedicated to protecting birds and their habitats.
While ecological issues became a key political theme in Europe, Spain “redesigned its political party system” after democracy was re-established following the death of long-time dictator Francisco Franco in 1975 without making room for green parties.
At the same time European authorities routinely call out Spain for its environmental shortcomings.
According to the European Commission, Spain racked up more infringements of European Union (EU) environmental law between 2015 and 2018 than any other member state — and nearly three times as many as the average for members of the bloc.
In July Brussels asked the EU's Court of Justice to take action against Spain over its “systemic violations” of rules limiting nitrogen dioxide emissions, a poisonous gas in car exhaust.
Spain is also a laggard when it comes to recycling. The country is “far from achieving” the EU goal of recycling 50 percent of urban waste in 2020, the European Commission says.
The situation is probably “linked to the Franco dictatorship, which in its final phase, bet on development at all costs, which continues today,” said Cattaneo.
As a result “mass tourism and construction are the economic motors of the country” along with intensive agriculture, and for these sectors “environmental laws are a problem,” he added.
Wind power leader
But Spain does have some bright spots when it comes to the environment.
It is Europe's second-biggest generator of electricity from wind power after Germany and solar power plants are springing to take advantage of the sunny climate.
For over 15 years Madrid has had a special prosecution office for environmental crimes.
“Spain has worked well to protect its marine environment,” said Enrique Segovia, head of the Spanish branch of the World Wildlife Fund.
The country has one of the highest shares of protected natural areas among the 36 members of the Organisation for Economic Co-operation and Development (OECD), according to the Paris-based group.
The World Heritage-listed Doñana National Park in southwestern Spain is one of Europe's most extensive wetlands and a refuge for migratory birds.
But the park, which covers over 54,000 hectares (133,000 acres), is threatened by agriculture and over-exploitation of water.
“Youth is waking up,” said the director of the Spanish branch of Greenpeace, Mario Rodriguez, in a reference to the “Fridays for Future” movement against climate change started by Swedish teenager Greta Thunberg.
But the “Fridays for Future” protests held in Spanish cities so far have seen only small turnouts.
By AFP's Thomas Perroteau