
On the streets of Barcelona, fiery red and gold Chinese dragons (presumably with very sweaty people inside the costumes) danced among delighted crowds, while Chinese acrobats elicited gasps of amazement as they rolled, tossed and threw spherical lanterns in the air, keeping - as if by magic - the candle inside them upright at all times.
Shanghai made history this week: the first Asian metropolis to be invited as the city of honour to Barcelona's famously rambunctious cultural festival, La Merce. Vast street processions here are overwhelmingly aimed at celebrating centuries-old Catalan traditions. So it was quite something to witness velvet-clad Catalan pipers, sashaying down Barcelona's main boulevards, their medieval tunes intermingling with lilting music that accompanied flocks of brightly dressed Chinese performers.
Shanghai Vice Mayor Lu Shan flew to Barcelona to speak at La Merce's opening ceremony. Chinese and Catalan cultural traditions differ in form, he remarked, but they share "a common spirit".
Spain and China are experiencing a period of mutual appreciation. But that sense of bonhomie is far from shared across the EU.

Spanish Prime Minister Pedro Sanchez has visited China's President Xi Jinping four times in as many years. He's urged the EU as a whole to improve relations with China since Donald Trump's re-election two years ago.
Sanchez's move has sparked resentment and disapproval among a number of Spain's European partners who view Beijing as a strategic rival and possible geopolitical threat to the EU. Privately, they ask if Madrid's welcoming stance - opening up its market to Chinese businesses - is enabling China to become the (economic) enemy within the bloc too.
Pedro Sanchez is not the only EU leader going off piste. Global volatility means other EU countries feel squeezed and exposed and unsure they can rely on America under President Trump. His policy on trade and defence is seen as unpredictable and, at times, aggressive. And so EU member states are selecting strategic partners that they believe suit their national needs, even if that alienates or irritates fellow member states.
So do these new-found alliances risk a permanent splintering of unity in the EU or even Nato?
Spain accused of self-interest
Germany and France - the EU's biggest powers - have just 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 to address ballooning trade imbalances with Beijing that the European Commission claims 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, which they say has enabled Russia to sustain its military assault.
That's why, 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, largely bringing car parts and electrical goods to Spain and transporting delicacies like Spanish ham and red wine back to China. The link is a symbol of the burgeoning relations between the two countries.
"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, the Spanish government's trade and investment agency, 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, under whom Hungary was dubbed "China's gateway into Europe".
"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, its traditional ally.
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. Meanwhile, Spaniards have seen the US president threatening their prime minister with economic sanctions when he doesn't agree to Donald Trump's demands to increase defence spending to 5% of GDP or allow US bases in Spain to be used as part of attacks on Iran.
That's why China is viewed by many in Spain as more reliable than the US.
And 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.
"Chinese companies are investing in car manufacturing in Spain, filling the gaps we had," says Cortizo.
But critics worry Chinese factories on Spanish soil will weaken the EU single market.
There isn't just Chery in Barcelona. Chinese battery and stationary-energy-storage company Hithium plans to invest in Navarra in the north of Spain and battery manufacturer CATL is involved in building a lithium iron phosphate battery gigafactory in Zaragoza, 200 miles west of Barcelona. Critics fear these projects are part of Chinese companies' efforts to localise production in the EU to evade tariffs on imports of Chinese electric vehicles.

However, Miguel Otero, China specialist at Madrid's ElCano Royal Institute, accuses Spain's European allies of being condescending and hypocritical.
"France, Italy, Germany, they all have their own strategic relationship with China," he tells me. "Spain isn't going much further. It's been catching up with them." In fact, he says, now that Europe can no longer rely fully on the US, Spain's priority is to diversify. It wants to do business not just with China but also Canada, Brazil, India and Africa. Spain is not China-obsessed, he says.
But there's also the question of security.
On his latest trip to Beijing in April, Prime Minister Sanchez met the founder of Chinese wind turbine manufacturer Ming Yang, which had just had its plans to open the UK's largest wind turbine manufacturing plant in the Highlands blocked on national security grounds.
This followed uproar in the EU after Spain's Ministry of the Interior awarded Chinese tech giant Huawei a €12.3m contract to store and manage sensitive judicial wiretap data last year.
MEPs from several political groups in the European Parliament said Spain's contract could endanger the EU as a whole.
"When you introduce a high-risk vendor... we do not just risk a localised data breach, we risk poisoning the well of European intelligence sharing," said Markéta Gregorová, a Czech Pirate Party MEP, part of the Greens group back in February.

Juan Ignacio Zoido Álvarez, a member of Spain's centre-right opposition party, said the decision puts "the entirety of the EU at risk".
Spain's defence ministry continues to deny there is any risk, but former US Ambassador to Nato Julianne Smith, the co-founder of geostrategic advisory firm Clarion Strategies, warns the episode could really erode European cohesion.
"As EU countries seek ways to hedge against what some see as an unpredictable and unreliable America, they have to be careful not to rush towards alternatives that stand to weaken the EU's collective hand," she tells me.
"Some of those growing relationships, such as Canada's rapidly expanding relationship with the EU, could produce real dividends," she added. "But others, such as Spain's decision to deepen its relationship with China, could further derail the EU's ability to speak with one voice and create added security vulnerabilities for both Spain and wider Europe."
More emerging alliances
Spain is far from alone amongst EU countries in striking up controversial alliances.
Finland has a massive 1,300km-long land border with Russia. This has left it feeling exposed since Moscow's full-scale invasion of Ukraine.
Finland already has the highest rate of civilian firearm ownership per capita in the EU. It has the largest reserve military force in both the EU and Nato. It has built cavities under bridges that can be packed with explosives, should Russian armoured vehicles enter its territory. This is a country that believes military preparedness is an existential necessity.
In 2022, it decided there was safety in numbers. Helsinki ditched its traditional strategic neutrality and rushed to join Nato.
Now though, there are fears that Washington might not respect the alliance's mutual defence clause in case of an attack on a member country.
No longer confident the US would come to the rescue if needed, Finland has turned to Israel to purchase advanced defence equipment, including the David's Sling air-defence system and Spike anti-tank missiles.
Finland renewed its contract with Israel at the height of the recent Gaza war despite its government having publicly expressed considerable reservations about Israeli activity in the occupied Palestinian territories and at a time when many other EU countries also feel deep unease about Israel's policies and activities in Gaza and the West Bank.
"There is a sense in Finland that we can't always afford [to have] a moral superiority. Survival comes at a price," says Minna Alander, a fellow with the Transatlantic Defence and Security Programme at the Center for European Policy Analysis (CEPA).
"Finns and political opposition parties do question whether Israel is a country whose defence industry they want to support [because of its actions in Gaza and the West Bank] but the Finnish government has kept out of the debate, saying the deal with Israel fulfils Finland's needs," she tells me.
In the end, Alander says her fellow Finns have "a less sentimental mentality".
Greece's shift
Greece also feels threatened by a far bigger, immediate neighbour. It perceives Turkey as a "constant and significant danger to its national security and sovereignty", Nick Malkoutzis, co-founder of political analysis website MacroPolis, tells me.
In the past, the US mediated disputes between the two countries. Both are members of Nato. But under Donald Trump, Nato insiders say the US is increasingly perceived as missing in action politically and diplomatically, with Washington's focus very much elsewhere.
In late August, Greece and Israel signed one of the largest defence export deals in both countries' histories. The "Achilles Shield" agreement provides Athens with Israeli technology aimed at protecting Greece against a range of threats, including drones, aircraft and missiles.
There is a history of public sympathy with the Palestinian cause in Greece and many people have been sceptical about ever closer relations with Israel. But Malkoutsis says the public and political reaction to the "mega-deal" with Israel has been "more muted than might have been expected".
He says this is because there is a bottom line - a common understanding of the fundamental need for Greece to strengthen its security in relation to Turkey that takes priority over everything else.
With Israel a close ally of Washington, Greece hopes that "buying Israeli" will also help maintain decent relations with the US, even in these turbulent times.
But it's a delicate dance because Greece and Finland both very much want to be seen as "good Europeans", feeding into the European collective, according to Malkoutsis.
He says EU countries "scrambling in all directions" complicate everyone getting on the same page and speaking with one voice on defence and security which is the opposite of what Brussels and Nato say they want.
That said, European countries banding together in smaller groups to pursue common interests is nothing new. The E3 "gang", composed of the UK, Germany and France, was originally formed in 2003 to co-ordinate diplomatic negotiations with Iran in the hope of a nuclear deal. It's now a more ad hoc communication channel for Europe's three largest military and economic powers.
Nordic and Arctic nations have their own formats for working together to promote regional defence, while the "Visegrad Four" made up of Czechia, Hungary, Poland and Slovakia was for many years a well-known pressure group in EU circles.
However, Nato and the EU are convinced that the continent is under intense pressure, unprecedented since the end of the World War Two. Their leaders say it is time to form a united front. An aggressive Russia growls threateningly at the door, bolstered by Beijing, while the United States, Europe's former best friend abroad, seems, at best, distracted by other priorities.
Splintering, fracturing and rampant "mini-lateralism" will only be applauded by Europe's adversaries, they believe. China and Russia are watching closely.

BBC InDepth is the home on the website and app for the best analysis, with fresh perspectives that challenge assumptions and deep reporting on the biggest issues of the day. Emma Barnett and John Simpson bring their pick of the most thought-provoking deep reads and analysis, every Saturday. Sign up for the newsletter here
Get in touch
Are you personally affected by the issues raised in this story?