Amid the Trump administration’s all-time high pressure on Iran, manifested in its decision not to extend sanctions waivers granted to Tehran’s key oil customers, Iran-US tensions are reaching levels unseen in recent decades.

To alleviate the burden on its shoulders, Iran might not be fully capitalising on China as its leading oil buyer. Yet Beijing could continue to be a key part of Iran’s solution to mitigate the impacts of biting US sanctions.

There is a lot about China to make it a valuable ally for Iran: It is Tehran’s top trade partner, receives the largest share of Iran’s crude exports and is a permanent member of the UN Security Council.

Above all, China is one of the committed signatories to the Joint Comprehensive Plan of Action (JCPOA) and one of Tehran’s major political allies.

Iran-China relations have in recent decades been more trilateral than bilateral, as the United States has imposed its presence to shape those ties one way or another. Washington’s pressure on Beijing has placed restrictions on those relations, but shared concerns about US foreign policy have also brought Iran and China closer together, creating grounds for further cooperation.

US measures meant to minimise interaction between Iran and China are no novelty. Such policies date to the 1980s, when Washington relentlessly opposed Chinese arms sales to Iran as the latter was busy waging a protracted war initiated by neighbouring Iraq.

The US pressure on China in the mid-1990s over its nuclear cooperation with Iran worked to the point of bringing the collaboration to a complete halt. Nonetheless, despite ups and downs, China and Iran have over time maintained an overall close relationship.

Under the current global circumstances, the US-Iran-China triangle is being reshaped. Beijing and Washington are inching closer to a settlement in their trade war, which is crucial to China.

The agenda of those talks includes a US request for China to stop buying Iranian oil. If reached, a US-China trade deal could thus deal a blow to Tehran-Beijing relations and hit Iran’s crude exports to its principal customer. But with recent changes in the positions of the United States and China in trade talks, a prompt end to their trade war is unlikely.

Still, much depends on how China will meet US conditions set on oil purchases from Iran. Beijing has a record of complex responses to International crises, especially when the United States is involved.

The latest example was the Chinese stance toward President Donald Trump’s overtures to North Korean leader Kim Jong-un and how it left the US president with mixed feelings of gratitude and criticism.

On technical grounds, a suspension of oil imports from Iran would not be a simple decision for China. It would harm Chinese interests because Iran remains an important supplier at a time of international crises, which has seen producers such as Libya plunge into chaos.

Elsewhere, Algeria suffers from instability, the US sanctions on Venezuela are complicating the oil market and output from Angola which feeds a significant portion of China’s demand is declining.

Meanwhile, by ending oil purchases from Iran, China would be risking the support of a major player in regional energy security. Furthermore, among China’s Middle Eastern suppliers, Iran is the sole country that stays outside the radius of US influence. Given the heated-up Washington-Beijing strategic rivalry, this grants Iran a special status in China’s foreign policy.

Zeroing out Iran’s oil exports could be associated with other political and security implications as well, among them anticipated fresh tensions in the Middle East, especially in the Persian Gulf and the strategic Strait of Hormuz.

China imports nearly half its oil from the Persian Gulf, meaning any disruption in crude transits there would cost Beijing dearly.

Additionally, in the worst-case scenario, possible unrest in Iran as a result of US pressure could harm Chinese interests. From the bird’s-eye view, it could also alter the power balance in the Middle East against China.

Instability in the region would affect Beijing’s dividends from its international megaproject, the Belt and Road Initiative, which includes a number of Middle Eastern nations.

On a larger scale, the US banning of Iran’s oil exports is an act of unilateralism that jeopardises China’s interests. In parallel with that policy, Washington is pressing different countries to cut off business with Huawei, a Chinese tech giant that serves as the icon of the country’s export-oriented economy.

The US government has already launched a legal campaign against the wealthy corporation. It also keeps warning China’s partners against involvement in the Belt and Road Initiative. Setting all those unilateralist precedents, Washington is rapidly closing in on China.

On the other hand, by maintaining its oil imports from Iran but keeping them at a minimum level, Beijing would be able to maintain its leverage over Tehran. If those imports are fully halted and consequently Beijing loses its status as Tehran’s top trade partner, China’s influence would decline.

Furthermore, continued Chinese imports from Iran could serve as encouragement for the Islamic Republic not to depart from the JCPOA, a deal that promises great value to China’s multilateral foreign policy. Within that very framework, and ignoring US pressure, China has in recent months decided to augment its oil purchases from Iran.

Nevertheless, in the medium to long term, Iran cannot simply lean toward China to avert US pressure. Tehran only makes up 1% of Beijing’s total foreign trade, while the United States is China’s leading business partner, dominates the global financial system and remains the world’s biggest market. In addition, the Trump administration’s pressure on cooperation with Iran has proven to be working on Chinese firms.

Notwithstanding all that, Tehran can still expect Beijing to be an important part of a strategy against Washington’s unyielding pressure.

China is likely to ignore US punitive measures on trade with Iran, but at a minimum level, slightly below the threshold where it will be careful not to trigger any penalty. Put another way, Iran could still pin its hopes on China as a safety valve, but one that might exhibit less willingness to step up than expected.