Shops, bars and restaurants, supermarkets and airports in one of the UK’s favourite foreign holiday destination are being banned from setting their cooling systems below 27C (80.6 degrees Fahrenheit) in the summer - and told they can’t raise their heating above 19C (66.2 degrees Fahrenheit) in the winter.
The new Spanish government decree come into force next week.
Hotels are also affected, although it emerged earlier this week tourists can continue to keep their hotel rooms chilled during Spanish heatwaves because they are considered private spaces.
Receptions and other public areas of hotels will have to abide by the new laws.
The rules have been criticised by many hoteliers and restaurant owners and associations, with one of the arguments being that Seville and other cities known for their hot summers should not be treated the same as the likes of Galicia which is much cooler.
Lights will also have to go off in shop fronts and empty government offices from 10pm under the new rules, which will be in place until November next year.
Francisco Salado, the head of the Costa del Sol tourist board, launched one of the strongest attacks yet on the energy-saving measures.
He told respected Malaga-based paper La Opinion de Malaga: “Tourism is the industry of wellbeing, happiness, rest and relaxation.
“We want satisfied tourists, not roasted tourists or holidaymakers who are afraid of walking down dark streets.
“This government decree is a direct attack on everything we’ve worked hard to acheive over many years, which is that holidaymakers go home happy and look forward to returning.”
He added: “The decree has been designed and formulated behind the backs of economic agents and the productive, social and climatic reality of our country.
“Spain is not Germany or Finland and our customs, timetables and social and working habits are not those of northern or Central Europe.
“There it gets dark a lot earlier and we live a lot more at night.
“Within Spain the diversity and differences in climate and temperature are enormous according to the area.
“It’s as if this decree had been drafted by a Martian who is profoundly ignorant about Spain and hasn’t consulted with anyone.”
Earlier this week the Madrid region’s right-wing president Isabel Diaz Ayuso put herself on a collision course with Spain’s left-wing government by pledging to ignore the switch-off, claiming it would cause “darkness, poverty and sadness” and scare off tourists.
She said: “As far as the Madrid region is concerned, it won’t be applied.”
Colleagues later admitted the law would have to be respected following an opposition backlash.
Fines for those who commit “minor breaches” of the new law will be set at up to £50,000. Serious breaches could lead to fines of £83 million.
The energy-saving measures were announced as Spain entered its third heatwave this summer.
Spanish weather chiefs have said last month was the driest so far this year and the second-hottest since at least 1950.
The sea in areas like the Costa Blanca is still at 30C .
Javier Andaluz, Head of Ecologists in Action, said of the new government rules which follow an EU political agreement on energy-saving measures linked to the war in Ukraine: “The measures are adequate but also insufficient and too late.
“It’s sad this is being imposed as an exceptional circumstance and a sacrifice for the war in Ukraine, when they are necessary and common-sense measures that should be taken because of the climate emergency and the energy crisis we are experiencing.”