Spain and China are experiencing a period of mutual appreciation. This was reported by Qazaqyia.kz citing BBC News.

At Barcelona's La Merce festival, Shanghai made history as the first Asian metropolis invited as the city of honour. Shanghai Vice Mayor Lu Shan flew to Barcelona to speak at the opening ceremony.

Spanish Prime Minister Pedro Sanchez has visited China's President Xi Jinping four times in as many years. He has urged the EU to improve relations with China since Donald Trump's re-election. This move has sparked resentment among Spain's European partners who view Beijing as a strategic rival and possible geopolitical threat to the EU.

Germany and France - the EU's biggest powers - have united around a more aggressive approach towards China. They want to give Brussels the muscle to shut subsidised Chinese competitors out of the EU market. The European Commission claims trade imbalances with Beijing have reached a whopping €1bn (£850m) a day.

Other EU countries fret about China's tight relationship with Russia. Beijing has denied helping Moscow's war effort in Ukraine but defence experts point to technological and economic support from China.

As Spain enthusiastically courts Beijing, it stands accused of looking after its own, rather than wider European interests.

"It's a bit chicken and egg. Did Spain distance itself from European allies, or did they distance themselves from us?" asks Victor Cortizo, a lawyer and academic specialising in Sino-Spanish relations. "I think it's more us. It's Spain. But legitimately so. Realpolitik is a thing. If I get closer to China because that attracts Chinese investment and bolsters my economy, then that is strategically more appealing than supporting allies who are also only looking out for themselves."

Cortizo and I were surrounded by towers of crates as we spoke, at the end of the longest freight rail link in the world. It runs over 13,000km (8,000 miles) between Yiwu in eastern China and Madrid.

"Our prime minister has made the decision to pursue national gain over EU relations," Cortizo told me. "Chinese investment in Spain has doubled over the last year alone."

According to ICEX Spain Trade and Investment, Chinese investments in Spain are surging, driven in particular by investments in new battery gigafactories and car plants.

Cortizo thinks Spain could become Beijing's preferred European country to invest in now that Hungary is no longer governed by pro-China Viktor Orban.

"US investment is sinking and Chinese investment [is] rising in relevance here," Cortizo told me.

The US remains Spain's largest single foreign investor but net investment was down by around €1bn, according to Spain's Economy Ministry.

Spanish society now has a far more favourable attitude towards China than towards the US. According to a Pew Research Center poll published this summer, 54% of Spaniards said they had a favourable opinion of China compared to 30% who viewed the US favourably.

China makes it easy to trade, Cortizo told me, while the US (through Trump's tariffs and the effects of the war in Iran) has made it far harder.

When the major Chinese car manufacturer Chery Automobile chose Spain for its first European manufacturing and operations hub two years ago, it breathed life back into then-defunct Spanish brand Ebro.