Germany and Spain renewed their support for a gas pipeline to run between Spain and France across the Pyrenees by 2025, as part of a series of plans agreed during government consultations on Wednesday.
Hydrogen generated from renewable sources would later be transported through the pipeline under the plans, although France is opposed to the idea.
The measure was discussed during talks between Spanish officials and a German delegation led by Chancellor Olaf Scholz and eight of his 16 ministers, including Economics Minister Robert Habeck, Finance Minister Christian Lindner and Foreign Minister Annalena Baerbock.
Scholz was welcomed with military honours by Spanish Prime Minister Pedro Sanchez at the port of La Coruña to the first government consultations between the two countries in nine years.
The action plan addresses a wide range of policy areas from education to the economy, defence and security, and was to be adopted later in the course of the evening.
The agreement on energy comes at a sensitive time as prices soar and Germany and other European countries try to lessen their dependency on Russian supplies due to Moscow's war on Ukraine.
The Midcat pipeline that Scholz and Sanchez are calling for would run from Barcelona over the Pyrenees to connect with the French grid in Barbaira in southern France.
Work had already begun on the pipeline. In Spain, it has so far been completed up to Hostalric, 106 kilometres south of the border, while France has yet to complete 120 kilometres.
The project was cancelled in 2017 because it was not economically viable but the energy calculus in Europe has since changed, with gas prices for example reaching record highs as countries scramble to find other sources of power as the Kremlin slashes supplies.
The planned pipeline would transport natural gas procured by Spain and Portugal. Together, Spain and Portugal have a total of seven liquefied natural gas terminals. Two pipelines bringing gas from Algeria would also be a further source of gas.
However, Paris is still opposed to the construction of the Midcat pipeline. Ahead of the talks with the German delegation, Sanchez called on France to drop its opposition to the project. The pipeline concerns the entire EU, he told Germany's Frankfurter Allgemeine Zeitung newspaper.
Given the ongoing war in Ukraine, European interests, rather than the interests of individual states, should take precedence, Spain's Sanchez said.