Spain's Naturgy Energy Group SA and Algeria's Sonatrach have agreed to buy Abu Dhabi state fund Mubadala's 42.09% stake in the Medgaz pipeline, which carries natural gas from Algeria to Spain, Naturgy said Tuesday.

The deal values the infrastructure at 1.9 billion euros including debt.

Following the close of the transaction, Sonatrach will be the main shareholder with a 51% stake, while Naturgy will hold the remaining 49%.

Naturgy will pay 445 million euros to Mubadala for a 34% stake and structure the deal through a special purpose vehicle.

It said it might sell a stake in this vehicle, which will be funded with a 260 million euro loan, to a financial partner.

Naturgy said it expected the deal to close by the end of March 2020 and the stake should pay annual dividends of more than 130 million euros.

(Reporting by Gdansk Newsroom and Nathan Allen in Madrid, editing by Andrés Gonz?lez and Jason Neely) ((gdansk.newsroom@thomsonreuters.com; +48 58 778 51 10;))