US President Donald Trump is set to meet his counterpart, Xi Jinping, on Thursday in Beijing for a two-day visit. Business and trade deals are at the top of the agenda for the leaders of the world’s two largest economies, but Iran will loom large in the background.

Providing military support to Iran in its war with the US and Israel has benefited China, but the conflict in the Middle East also challenges its ties with Gulf states and its broader economic model, experts say.

“Iran’s brave response [to the US attack] gave Trump a lesson. Trump cannot blackmail China, not to mention Iran, with the so-called ‘art of the deal'," Wang Yiwei, an international relations scholar at Renmin University in Beijing, told Middle East Eye.

China is the US’s only peer rival. The two are locked in competition over artificial intelligence, critical minerals and Taiwan.

The US's failure to subdue Iran has been welcomed in China, and the emerging power has not just been sitting idle on the sidelines.