Spanish energy giant Repsol SA said Tuesday that it agreed to sell a package of liquefied natural gas assets to Royal Dutch Shell Plc in a transaction valued at $6.65 billion.

Shell will pay $4.4 billion in cash and assume $2.25 billion in debt, Repsol said in a regulatory filing.

The Spanish company stands to net $3.5 billion as part of the asset-shedding called for in its 2013-2016 strategic plan, Repsol said.

Repsol is selling Shell its minority stakes in Atlantic LNG, based in Trinidad and Tobago, Peru LNG and Spain's Bahia de Bizkaia Electricidad.

Tanker ships associated with those assets are also part of the deal, but Repsol's regasification plant in Canada was ultimately excluded and Shell is to supply the Canaport facility with 1 million tons of LNG over the next 10 years.

The transaction, which is expected to close by year's end, will allow Repsol to reduce its net debt by half, the Spanish firm said.