China remains committed to the upcoming meeting between its leader Xi Jinping and US President Donald Trump regardless of the situation in the Middle East, and cautiously views its adversary’s months-long conflict with Iran as having potentially strengthened its negotiating position, according to Chinese sources familiar with the matter.

The rare in-person meeting, already once delayed due to the US-Israeli war with Iran, is now scheduled for May 14-15, according to the White House. Several sources indicate Beijing views the high-stakes summit as a singular opportunity to secure a more stable long-term relationship with its largest economic and military competitor.

But despite the perceived advantage, sources said Beijing remains extremely cautious, with opinion among government insiders split as to how to navigate the myriad complications unleashed by the conflict, not least the prospect of the Strait of Hormuz – through which China imports about a third of its oil and gas – remaining closed when Trump arrives in the Chinese capital.

Trump’s visit “is not the same as any other heads-of-state visit,” said a Chinese source under the condition of anonymity due to the sensitivity of the matter. “Trump’s time in office is likely to have a lasting impact on the world order and has already fundamentally altered how the US views its own interests.”

“Whether his visit is successful or not will have a long-term impact on future arrangements between China and the US, regardless of whether the Democrats or the Republicans come to power,” said the source.

The visit had originally been intended to focus on confirming crucial deals between the two sides across a range of key sectors, but the crisis in Iran has “seriously disrupted” China’s overall planning and expectations, said Cui Hongjian, a former diplomat and an international affairs scholar at Beijing Foreign Studies University.

“China’s foreign policy has a basic standpoint: China-US relations are the top priority. Once China-US relations are stable, that can in turn help to stabilize and even improve China’s relations with other countries,” Cui told CNN.

The sudden introduction of Iran, a close partner of Beijing, into the center of US-China relations has made things “difficult for the Chinese side,” said Cui.

Beijing has yet to officially confirm the date for the summit, but with the expected meeting less than two weeks away, the prospect of a US-Iran peace deal remains distant – with a resumption of fighting a real possibility. Neither scenario is without risk for China, according to a second Chinese source speaking on the condition of anonymity.

“Of course, Trump would want to visit China after he’s finished with Iran, so he can project power … but if he were to attack Iran after visiting China, it would appear as if China has abandoned Iran,” said the source.

“Trump is very clever, he doesn’t directly target China, but he first knocked out Venezuela, then he went after Iran – essentially clipping China’s wings in these regions,” the source added.

But the Iran war has not gone as planned for the US. Rather than demonstrating American power, the conflict has pulled the US into a deeply unpopular and seemingly intractable confrontation with spiraling global economic consequences .

“Trump now would want to turn the Iran page as quickly as possible,” said Wu Xinbo, a Foreign Policy Advisory Committee member of the Chinese Foreign Ministry. “If the US had gained an upper hand, Trump would have much stronger leverage. But now it’s clear, the US simply couldn’t handle Iran. So in a sense, when it comes to negotiations with China, its relative bargaining position has been weakened.”

Chinese officials are believed to have played a role in bringing Iran to the negotiating table. But while a subsequent ceasefire has largely halted fighting in Iran, Washington and Tehran remain unable to agree to a more secure peace.

According to sources, the situation could now present China with a unique opportunity to capitalize on the standoff ahead of what are likely to be brutal midterm elections for Trump – with the president seen as eager to present tangible wins to American voters, such as big Chinese purchases of US agricultural products and Boeing jets.

China is ready to leverage its vast domestic market and dominance in the rare earth supply chain to get what it wants: the US expressing “opposition” (instead of non-support) to Taiwan independence; reducing restrictions on high-end tech exports; and removing Chinese companies from its sanction list.

“Trump delayed his visit to China probably partly feeling he hasn’t gotten enough leverage,” said a third source, suggesting Trump had wanted to use a quick win in Iran as political leverage in his meeting with Beijing.

“But look at him now, the standoff in Iran has dragged for so long with no progress,” the source added, speaking under the condition of anonymity.

“We were very worried when the war first broke out – not just for our oil and business interests in the Middle East, we were concerned that, if Iran couldn’t hold up, a pro-West regime could emerge and then it wouldn’t be good for China’s interests,” said foreign ministry adviser Wu, who is also the director at the Center for American Studies at Fudan University in Shanghai.

“But the current situation has actually turned out to be favorable to China,” added Wu.

The war has widely been viewed has having burnished Beijing’s global standing, positioning China as a cornerstone of stability. Throughout the conflict, Xi has repeatedly called for peace and pledged to help developing countries weather the energy shortage brought about by the conflict. Western leaders, meanwhile, have appeared to step up relations with Beijing.

“The US is fighting without winning, China is winning without fighting,” said Joerg Wuttke, a former president of the European Union Chamber of Commerce in China and a partner at DGA Albright Stonebridge Group. “(The Chinese) are certainly negatively impacted because of the cost of energy, but at the same time, China is gaining a lot out of this situation.”

China’s political system, which favors long-term planning and self-reliance, has also provided it with an edge in countering the global economic shock.

“They are vindicated with their renewable policy. China is possibly the best prepared country. Politically, they are the winner, because they look like the adults in the room,” Wuttke told CNN.

Trump was met with an elaborate red-carpet welcome during his last presidential visit to Beijing in 2017. The so-called state visit-plus included an unprecedented series of lavish honors, including a private reception in the Forbidden City.

Any goodwill generated from that trip quickly receded, however, and was replaced by a near-decade of deepening rivalry between the two sides, spanning trade, technology, a standoff on Taiwan, accusations relating to the Covid-19 pandemic, and a bizarre spy balloon incident .

Given the gulf between the two sides, China will not stray too far from its playbook during the forthcoming meeting, Chinese sources indicated.

There are many areas where China and the US are still negotiating and “the more consensus we reach, the more mature the timing for the leaders’ summit will be,” said the first source.

China has refrained from directly criticizing Trump during the war in an apparent effort to ease tensions ahead of the summit. Trump, for his part, has also appeared to carefully manage potential flashpoints.

When US intelligence assessed China was preparing to deliver new air defense systems to Iran , Trump indicated that Beijing would face consequences if it went through with the shipment, but avoided any mention of Xi.

While some in China may feel emboldened about its negotiating position leading into the summit, William Klein, a retired US diplomat who arranged Trump’s visit to Beijing in 2017, doubts there has been a material change.

“Each side has sufficient leverage over the other side in the trade and investment relationship, and this leverage has not changed, it hasn’t strengthened, or it hasn’t weakened because of the Iran war to date,” said Klein.

“Obviously, the Iran war casts a shadow on the visit, will shape this visit, but I wouldn’t say that this gives one or the other side a stronger hand,” said Klein, who is now a partner at FGS Global.