China and Russia signed a massive natural gas deal worth up to $400 billion on Wednesday, strengthening the economic relationship between the neighboring countries amid ongoing tensions with the United States.

Representatives from China National Petroleum Corporation (CNPC) and the Russian natural gas giant Gazprom negotiated the agreement, which will provide the Chinese with Russian gas for 30 years beginning in 2018. The announcement concludes ten years of negotiations between the two nations.

Under the contract, Russia will provide China with 38 billion cubic meters of natural gas annually through 2048. Each country will be responsible for constructing its own portion of the pipeline, which will flow from Siberian gas fields to major consumption centers in North China, including the Beijing-Tianjin-Hebei metropolitan area.

This is the largest natural gas agreement in Russia’s history. Vladimir Putin has long wanted to take advantage of China’s growing economy and move away from stagnant European markets. He also seeks to prove that—despite Obama’s push for international sanctions against Russia—his country is no longer dependent on the West.

The deal will also benefit China, which has seen demand for natural gas rise by double digits in recent years. Gazprom CEO Alexei Miller declined to give the exact price of the deal, but sources at the companies say the cost per unit is lower than the cost of importing liquefied natural gas from elsewhere in Asia. This deal should help reduce China’s longtime reliance on coal and bring it closer to its goal of reducing pollution.

Posted by Catherine Matacic