St. Petersburg, Russia (CNN) Chinese President Xi Jinping had the ultimate tour guide on his visit to the St. Petersburg International Economic Forum this week: His "bosom friend," Russian President Vladimir Putin.

The Kremlin released photos late Thursday of Putin showing Xi around his hometown, the former imperial capital of tsarist Russia. The Chinese leader saw works from the Renaissance collection of the State Hermitage Museum, and got an evening boat cruise with the Kremlin leader. The rest of St. Petersburg, meanwhile, seemed to be out at the cafes.

Russian President Vladimir Putin and his Chinese counterpart Xi Jinping tour the Kremlin following their talks, Moscow, June 5.

But the friendly atmosphere was more than just the usual display of Russian-Chinese friendship. The St. Petersburg Economic Forum was an occasion for Putin and Xi to show a unified front in a broader confrontation with Washington.

In advance of the forum, Russia and China rolled out a big announcement: On Wednesday, Huawei signed a deal with MTS -- Russia's largest telecoms operator -- to develop 5G technologies and launch a fifth-generation network in Russia

The deal comes as Huawei , one of China's most important companies, is at the center of an escalating trade war between Beijing and Washington.

The Trump administration has barred Huawei from any involvement in American 5G networks over spying concerns, urging US allies to follow suit, while Huawei denies that its products pose any national security risk.

Putin and Xi Jinping at a gala dedicated to the 70th anniversary of the establishment of diplomatic relations between Russia and China.

Ban risks 'technological war'

At the St. Petersburg forum, Putin came down firmly on the side of Huawei, warning that Washington's actions risked "technological war" over digital technology.

"Let's take the situation around Huawei, for example, which is being not only driven out but unceremoniously pushed out of the global market," he said. "Some are already saying it's the first technological war of the coming digital era."

Putin warned that Washington's actions risked "technological war" over digital technology.

Putin also pivoted to a broader complaint: US unilateralism, something the Kremlin leader has long accused Washington of promoting.

In Putin's reading, the US wants to replace a rule-based system where states are treated as equal and sovereign actors with a situation where the US and other economically powerful countries dictate the terms.

"This is what the US is doing today, trying to expand their jurisdiction over the whole world," he said in St. Petersburg.

It's easy to see why Putin's sympathies lie with Huawei.

Russia has also been on the receiving end of US sanctions following the annexation of the Black Sea peninsula of Crimea in 2014. Sanctions and a risky investment climate have deterred much foreign direct investment, and the Russian government has touted Chinese investment as a more reliable alternative to Western investment.

But Russia's investment climate shows little hope of changing. Even as Putin was preparing to go onstage to cheer for Russian-Chinese partnership, attendees at the forum received some negative news: US investor Michael Calvey, who is currently under house arrest in connection with a controversial fraud charge in Russia, would not be attending the forum.

Calvey, who has been an ardent promoter of investment in Russia, was detained in Moscow in connection with a large-scale fraud investigation this February. He was moved from jail to house arrest in April following outcry from prominent Russian CEOs and government officials, and hopes were running high that he might be allowed to attend the forum.

Such a move would have been widely seen as a signal that Russia was ready to repair its image with investors. But that, in the end, did not materialize, despite the outpouring of support for Calvey.

After the delegations leave St. Petersburg, then, Russia may still have to continue to look to China to boost its image as an investment destination.