In a game-changing transaction Wednesday, China agreed to buy $400 billion of Russia’s natural gas over 30 years, allowing Russia to diversify its market at a time when tensions with U.S. and European nations have escalated.

OAO Gazprom Chairman Alexey Miller and Zhou Jiping, who chairs China National Petroleum Corp. (CNPC) signed a contract that would supply 38 billion cubic meters of Russian gas a year to China via the “eastern” route, Miller said. The document was signed in the presence of Russian President Vladimir Putin and Chinese President Zi Jinping.

Most of Russia’s gas supplies today are shipped to European markets. The transaction would give Russia a gigantic new market following sanctions after the country’s entry into sovereign Ukraine territory. CNPC is China’s largest petroleum company and one of the world’s largest national oil companies.

“Russia and China have signed the biggest contract in the entire history of the USSR and Gazprom,” said Miller. “Over 1 trillion cubic meters of gas will be supplied during a whole contractual period. Russian gas will be sold at a brand new market with a huge potential. The arrangement of Russian pipeline gas supplies is the biggest investment project on a global scale.

About US$55 billion is to be invested to build production and transmission facilities in Russia. An extensive gas infrastructure network is to be built in Russia’s East, which will drive the local economy forward, said Miller. “Great impetus will be given to entire economic sectors, namely metallurgy, pipe and machine building. Today we started the first page of a big book, a fascinating story of the Russian-Chinese cooperation in the gas industry, and many more essential chapters are yet to be written in it.”

The eastern route stipulates that gas would be delivered via the Power of Siberia trunkline, a unified system that encompasses the Yakutia and Irkusk gas production centers.

“The bulk of pipes used in the construction will be domestically manufactured,” said the Gazprom executive. “Some 11,700 experts will be engaged within phase one of the Power of Siberia project and some 3,000 employees will ensure the pipeline’s operation.”

In 2009, Gazprom and CNPC inked the framework agreement on the major terms and conditions of gas supply from Russia to China, which stipulated annual exports of 68 billion cubic meters to be exported to the Chinese market. Last September, the partners completed the conditions of the system to carry gas via the eastern route.