In an agreement reminiscent of the early days of the Cold War, Russia has agreed to supply China with hundreds of billions of dollars worth of natural gas via a pipeline from Siberia pipeline to begin pumping in four years.

NPR's Frank Langfitt reports from Shanghai that in 2018, Russia will begin sending 38 billion cubic meters of natural gas to China each year through the pipeline. Over the life of the 30-year contract, 1 trillion cubic meters would be delivered.

Frank says that Alexey Miller, the chief executive of the Russian company, Gazprom, has said the exact price was a commercial secret, but that the deal is estimated at $400 billion total. Gazprom shares rose 2 percent on the news.

"This is the biggest contract in the history of the gas sector of the former USSR," said Russian President Vladimir Putin, after the agreement was signed in Shanghai between Gazprom and China National Petroleum Corp (CNPC).

"Our Chinese friends are difficult, hard negotiators," he said.

"Both sides were in the end pleased by the compromise reached on price and other terms," Putin said.

The move comes as Russia has been increasingly isolated by Europe and the United States as a result of its annexation of Crimea and continuing unrest in eastern Ukraine. China, too, has been at odds with Washington over confrontations with its maritime neighbors in the South China Sea.

But Secretary of State John Kerry said Wednesday that there was no link between the crisis in Ukraine and the gas deal.

"We don't see any relationship whatsoever to an agreement with respect to gas and energy supplies between Russia and China that they've been working on for 10 years, for 10 years," Kerry told a news conference during a visit to Mexico City.

"This isn't new. This isn't a sudden response to what's been going on," he added.

Frank says that the deal, cemented during Putin's visit to Shanghai this week for an Asian security summit, "is most important to Russia, as its economy slows and it looks for new gas markets."

Reuters says:

"China had the upper hand as talks entered the home stretch, aware of Putin's face-off with the West."But both sides could take positives from a deal that will directly link Russia's huge gas fields to Asia's booming market for the first time - via thousands of miles of new pipeline across Siberia that form part of the package."

Copyright 2016 NPR. To see more, visit