Spanish Prime Minister Pedro Sanchez announced Thursday that Spain, Portugal, and France have reached an agreement to increase energy connections.
The three countries' leaders met in Brussels ahead of an EU meeting on energy prices.
For months, Spain, and Portugal have been trying to pressure France to agree to help build the MidCat pipeline, which would connect Spain and France over the Pyrenees mountains.
However, Sanchez announced Thursday that the three nations agreed to substitute the MidCat with a submarine pipeline connecting Barcelona and Marseille.
The pipeline would be able to transport natural gas and hydrogen. According to Sanchez, the plan's details will be ironed out before the leaders meet again in Spain this December.
Sanchez said the trilateral agreement to boost energy connections will be compatible with the energy transition and allow Spain to use its substantial liquified natural gas infrastructure to help satisfy Europe's energy needs.
"I want to thank the opening of Emmanuel Macron and Costa's solidarity. This is very good news," Sanchez told reporters.
The Spanish leader also announced that Spain and Portugal will now spearhead a new project to shift regulations to enhance energy storage across the Iberian Peninsula.
After Thursday's meeting, Portuguese Prime Minister Antonio Costa told media that he was "very satisfied."
Ahead of the EU-wide meeting on energy, which Dutch Prime Minister Mark Rutte said could last well into the night, Sanchez said he would be "delighted to eat breakfast" with Rutte "if we can reach an agreement that will benefit Europe."
At an earlier EU meeting on energy this year, Sanchez was said to have refused to budge on his position regarding a natural gas price cap for the Iberian Peninsula, dragging the meeting on for hours.
During that meeting, Spain and Portugal eventually convinced other member states to allow them to put a cap on the price of natural gas.
On Thursday, Sanchez bragged that European leaders were now considering extending the Iberian price cap solution to the entirety of the EU.