The US 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 signalled that it intends to keep working with the Islamic regime despite the US 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 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 US sanctions.
Trump's move to reimpose sanctions will affect all firms that operate in US 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 US 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 on Wednesday that unless it is exempt from US 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 US and China and all kinds of political issues, I see the resistance from Chinese crude buyers to comply" with US 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 US decision on Iran, and the average daily exchanges tripled month-on-month this week.
Beijing, keen to "further internationalise 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 US 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 US 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."