ROME — President Xi Jinping of China arrived on Friday at Rome’s presidential palace with a cavalry escort usually reserved for royals. For a three-day visit, Italy pulled out all the stops for an economic superpower promising billions in investment and trade deals in exchange for officially signing on to China’s vast new Silk Road.

But even as Mr. Xi and his wife were serenaded at a state dinner by Andrea Bocelli, the leaders of France, Germany and the European Union huddled in Brussels hoping to strengthen the Continent’s defenses against what they considered to be China’s economic incursion.

The disconnect between the two scenes laid bare the divisions and tensions in Europe, caught in the middle of a trade war between the United States and China, while trying to find its bearings and assert its power in a volatile era of shifting geopolitical alliances and American retrenchment.

“China plays on our divisions,” President Emmanuel Macron of France, speaking in Brussels, told reporters on Friday, adding that the European Union had finally woken up to China. “The period of European naïveté is over.”