Europe's biggest gas infrastructure group said on Saturday it would pay energy company Eni 385 million euros ($436 million) for a 49.9% stake in the pipelines to jointly control the assets with its fellow Italian company.
Snam, which makes most of its money from managing Italy's natural gas transport grid, has pledged to spend more on new, clean business lines such as green hydrogen.
Like other European gas grid operators, it is upgrading its national network to be hydrogen ready.
"In the future, North Africa could also become a hub for producing solar energy and green hydrogen," Snam CEO Marco Alvera said in a joint statement with Eni.
Snam, which runs most of Italy's gas storage facilities, also owns 20% of the TAP pipeline that carries Azeri gas into Italy.
The deal reflects the accelerating pace of planning taking place in the global oil and gas industry, keen to adapt as governments and activists ramp up the pressure to slash greenhouse gases.
Eni is working on spinning off a series of oil and gas operations into new joint ventures to help reduce debt and fund its shift to low-carbon energy.
"This transaction allows us to free up new resources to be used on our energy transition path," Eni Chief Executive Claudio Descalzi said.
Eni, one of the biggest foreign oil and gas producers in Africa, has a series of strategic agreements with Algerian state-owned energy group Sonatrach.
Italy imports more than 90% of its overall gas needs and Algerian gas currently accounts for around 30% of flows.
The pipeline companies involved in the deal posted net income of around 90 million euros in 2020.
Snam was advised by UniCredit, while Eni was advised by Rothschild.
($1 = 0.8836 euros)
(Reporting by Stephen JewkesEditing by Giselda Vagnoni and Mark Potter)
By Stephen Jewkes