London (CNN) -- When Russian President Vladimir Putin and his Chinese counterpart Xi Jinping signed a huge gas deal last month, the timing couldn't have been better.
It was on the eve of the Putin's St Petersburg Forum, and just weeks after the G7 energy ministers had announced a long-term plan to lessen Europe's troubling dependency on Russian energy.
The multi-billion deal had been in the works for a decade, as the two parties negotiated the price. Russia finally agreed to supply natural gas for 30 years starting 2018. The price was not made public, but is estimated at around $456 billion over the 30-year term.
The deal is a milestone in Russia's efforts to pivot towards the east. The country has suffered as the crisis in Ukraine deepens and the West implements sanctions.
"The deal will allow [Russia] to continue with an energy-focused business model," said Andreas Woergoetter, an OECD economist and the head of Russian economy division.
The IMF said that the Russian economy is in recession, and has lowered its growth forecast to just 0.2% for the year. "There have been consequences on the Russian economy as a result of the geopolitical situation, the uncertainty, and the sanctions that have been decided," IMF chief Christine Lagarde told CNN last month.
But as its traditional trading ties have weakened, Russia has been building economic relationships elsewhere. In the last five years, trade between Russia and China has grown by a third, from $21 billion in 2008 to nearly $36 billion in 2013.
Russians are buying even more from China. In 2013, Russian imports from China added up to $53 billion, largely made up of textiles and other consumer technology such as mobile phones.
However, Woergoetter said that any increase of imports from China might be problematic, "making it even more difficult for Russia to develop a competitive manufacturing sector."
VTB, Russia's second biggest bank, and the Bank of China have also agreed to pay each other in their own domestic currencies to bypass the U.S. dollar.
Politically, the two countries have often faced the Western world together within the UN Security Council meetings, such as when they voted against the majority on issues around Syria, Zimbabwe and Myanmar.
The deepening relationship was underlined when Xi decided that his first foreign visit as a newly elected Chinese president would be to Moscow.