Several energy companies had threatened to take the government to court if the levy - a 1.2% tax on power utilities' sales - was approved in its original form.

Now regulated business, including electricity, gas and liquefied petroleum gas (LPG), will not be subject to the tax and neither will regulated revenue from transport and distribution networks of power and natural gas.

The changes were put forward by the Basque nationalist party PNV and Catalan party PdCat and form part of a bill that would also tax banks to raise revenue to plough into helping households cope with cost-of-living pressures.

Prime Minister Pedro Sanchez's minority leftist government is trying to broaden parliamentary support to pass the bill, which aims to raise 7 billion euros ($7.23 billion) in 2023 and 2024 from banks and energy companies.

The amendments also provided for the new tax to be applied only to company activities carried out in Spain.

The lower house of the parliament must still approve the bill before it sent to the upper house.

($1 = 0.9688 euros)

(Reporting by Emma Pinedo; editing by Jesús Aguado, Mark Heinrich and Kirsten Donovan)