The U.S. decision to reimpose sanctions on Iran could scare off European investors, but oil-thirsty China may step into the void and ramp up business links with the country.
China, which is already Iran's top trade partner and one of its biggest buyers of crude, has signaled that it intends to keep working with the Islamic regime despite the U.S. move.
Beijing is a signatory of the 2015 Iran nuclear deal that had eased sanctions on Tehran, but President Donald Trump quit the accord earlier this month and said Washington would reinstate punitive measures.
"By driving away American, European and Japanese companies, the sanctions could increase opportunities for Chinese businesses," Hu Xingdou, a Beijing-based economist, told Agence France-Presse (AFP).
The Iran deal has been highly profitable for the Asian giant. Chinese businesses involved in Iranian developments are worth at least $33 billion as of June 2017 according to Beijing's Commerce Ministry - part of the country's ambitious Belt and Road global infrastructure initiative.
In September, China provided a $10 billion credit line to five Iranian banks financing water, energy and transport projects, and in March the two countries inked a $700 million deal allowing China to build a train line that links the port of Bushehr to the rest of Iran's railway network.
Beijing now has its sights on the expansion of a major Iranian gas field, with state-owned oil company CNPC set to replace Total if the French energy behemoth withdraws from the project over U.S. sanctions.
Trump's move to reimpose sanctions will affect all firms that operate in U.S. dollars or do business on American soil, hitting European companies especially hard.
But the lure of fresh hydrocarbons could prove irresistible for China, the world's largest crude oil importer.
Iran is currently China's fifth top oil supplier, with more than a quarter of its output going to Beijing. Bolstered by the flow of black gold, Chinese-Iranian trade leaped by 20 percent in 2017 to $37 billion.
European companies could be hit hard by U.S. sanctions
Total started the huge $4.8-billion gas field project known as South Pars 11 in July 2017, two years after the nuclear deal between Tehran and Western powers prompted the return of many businesses to Iran.
But the French company said Wednesday that unless it is exempt from U.S. sanctions, it would "not be in a position to continue" the project, leaving the door open for CNPC to take its place.
Iranian Oil Minister Bijan Namdar Zanganeh has said that if Total pulls out, its share of the project, slightly over half, will be handed to the Chinese firm.
China "needs the oil," Victor Shum, vice president of energy group at IHS Markit, told CNBC.
"With trade skirmishes between the U.S. and China and all kinds of political issues, I see the resistance from Chinese crude buyers to comply" with U.S. sanctions, he said.
The price of Iranian oil is likely to fall as its pool of buyers shrinks, Shum said, making it "more attractive" to the Chinese.
And with Washington targeting transactions made in dollars, the yuan could be used to skirt around the new rules.
"In 2012-2013, Iran opened accounts in local currencies in buying countries that it then used to finance imports," said Barclays analyst Michael Cohen in a note.
"If China, India, Japan and South Korea do not impose sanctions on the Central Bank of Iran, these countries would be unlikely to stop taking Iranian oil," he added.
Chinese Foreign Ministry spokesman Geng Shuang made clear last week that Beijing would keep doing business with Tehran: "We will continue with our normal and transparent practical cooperation with Iran on the basis of not violating our international obligations."
Yuan-denominated oil futures contracts were launched in Shanghai in March, an attempt to one day challenge the entrenched position of New York- and London-based dollar futures.
The volume of trading of Shanghai contracts doubled the day after the U.S. decision on Iran, and the average daily exchanges tripled month-on-month this week.
Beijing, keen to "further internationalize the use of its currency," could make Tehran trade in yuan, according to analysts at BMI Research.
But the impact of this would be modest, they warned, as "trade between Iran and China represents only a small fraction of the crude oil market."
Iranian oil "is not irreplaceable" to China, which could import more from Russia and Saudi Arabia, said the economist Hu.
Chinese firms will also be careful not compromise activity in the U.S. or other western countries, he said, noting that CNPC has several American trade partners.
Chinese telecoms equipment maker ZTE, for instance, had to cease major operations after it was hit with a ban on acquiring crucial American technology for allegedly violating U.S. sanctions against North Korea and Iran.
In the end, political uncertainty in Tehran could deter Chinese investment, Hu said.
"China needs to learn from the past: It invested heavily in Libya and Venezuela and lost a lot."