European Union negotiators struck a political deal on Thursday on more ambitious targets to expand the use of renewable energy by 2030, an important pillar of the bloc's plans to fight climate change and end the use of Russian fossil fuels.

EU countries and the European Parliament agreed that by 2030, the 27-country EU will get 42.5% of its energy from renewable sources like wind and solar, member of European Parliament Markus Pieper said in a post on Twitter.

The political deal must now be approved by the EU Parliament and EU countries, before it can become law. Those votes are usually a formality that approves the deal without changes.

The new law will replace the EU's current target for a 32% share of renewable energy by 2030.

The EU got 22% of its energy from renewable sources in 2021, but the level varied significantly between countries. Sweden leads the 27 EU countries with its 63% renewable energy share, while in Luxembourg, Malta, the Netherlands and Ireland, renewable sources make up less than 13% of total energy use.

A rapid shift to renewable energy is crucial if the EU is to meet its climate change goals, including a legally binding aim to cut net greenhouse gas emissions by 55% by 2030, from 1990 levels.

The renewable energy targets have gained additional significance since Russia’s invasion of Ukraine, as the EU has vowed to end its dependence on Russian fossil fuels by 2027 - and plans to do this mostly through locally produced, low-carbon energy.

Reaching the new goals will require massive investment in wind and solar farms, scaling up production of renewable gases, and reinforcing Europe's power grids to integrate more clean energy.

The European Commission has said additional investments of 113 billion euros ($123 billion) in renewable energy and hydrogen infrastructure will be needed by 2030, if EU countries are to end their reliance on Russian fossil fuels.

($1 = 0.9223 euros)

(Reporting by Bart Meijer and Kate Abnett; Editing by Himani Sarkar, Robert Birsel)