BARCELONA, Spain — Jilted, betrayed, dumped or defiant. It’s hard to describe the European Union after relentless attacks from its once-dependable ally, the United States. The threat from President Donald Trump’s second administration against Greenland, its sweeping tariff plans and courtship of Moscow have firmed up some European leaders’ vows to reduce their reliance on America.

That has not gone unnoticed by another global power. China hopes for a Europe detached from the U.S. and is sensing an opportunity to divide the West. For the past several years, the EU moved in lockstep with Washington to levy tariffs on Chinese electric vehicles and sanction its officials accused of rights violations.

Now in a trade war with Washington that may be prolonged, Beijing sees the 27-nation bloc as a desirable partner in blunting the impact from Trump’s tariffs and to maintain its strong global position.

But for EU leaders, meeting Thursday in Brussels to discuss China among a host of regional and global issues, managing ties with Beijing is no easy matter.

An upcoming summit in China in July to mark 50 years of ties might offer the first hint of new consensus between these global behemoths. The EU-China economic ties are hefty: Bilateral trade is estimated at $2.7 billion a day.

China is the EU’s second largest trading partner in goods, after the U.S. China and the EU believe it is in their interest to keep trade ties stable for the global economy’s sake, and they share certain climate goals.

Like the U.S., Europe runs a massive trade deficit with China. It relies heavily on China for critical minerals. As European companies are seeing declining profitability in China, Brussels is hoping Beijing will follow through on recent pledges, like one announced Thursday to ease restrictions on foreign business ventures.

Analysts don’t expect a grand bargain at the summit, but China will likely demand the EU lift tariffs on EVs or reopen a bilateral trade treaty. Either or both would send a powerful signal to Washington.