European Union member states on Monday gave final approval to a plan to phase out all imports of Russian pipeline gas and liquefied natural gas by 2027.

Imports of Russian LNG will end by the close of 2026, followed by a ban on pipeline gas starting Sept. 30, 2027. The move is part of the bloc’s broader effort to cut off a key source of revenue for Russia’s war in Ukraine.

The ban, known as REPowerEU, passed by a qualified majority vote of 24 to 2, with Bulgaria abstaining and Hungary and Slovakia voting against it. Budapest said it may challenge the decision before the Court of Justice of the European Union.

EU countries must submit diversification plans by March 1, 2026, outlining how they intend to replace Russian gas supplies and address potential risks, the Council of the European Union said in a statement.

The ban will take effect in March, with existing contracts allowed to run during a transition period. “This stepwise approach will limit the impact on prices and markets,” the council said.

The restrictions may be temporarily lifted for up to four weeks if a member state declares an emergency due to severe gas shortages.

Despite efforts to reduce dependence on Moscow, the EU still imported 13% of its gas from Russia in 2025, leaving the bloc exposed to what officials described as “significant” trade and energy security risks. Russian oil imports, by contrast, fell to below 3% last year.

The European Commission is now preparing additional legislation to phase out Russian oil imports entirely by the end of 2027.