China’s economy, which this past week reported its lowest annual economic growth in nearly 30 years amid a prolonged trade dispute with the United States, is faced with a new troubling source of U.S.-related instability: rising tensions in the Middle East.

The U.S. airstrike that killed a top Iranian general, Qassem Soleimani, just three days into the new decade has sparked a global fear of another war in the Middle East, which would further destabilize the world’s biggest oil producing region.

China has substantially reduced its dependence on Iranian oil since the U.S. re-imposed sanctions against Iran in November 2018.

But as the world’s top oil importer, and with growing infrastructure investment in the region, analysts say Beijing faces significant threats to its economic security if U.S.-Iran relations fail to stabilize.

Balancing its relations with Tehran and Washington will be a tough task for China, they say, pointing to the fact that Iran remains strategically important for its energy security and signature Belt and Road initiative, while the United States has the political and economic might to seriously check and even damage China’s continued development.

China’s trade with Iran, including crude oil imports, has substantially decreased in recent years in line with the worsening of Iran-U.S. relations, making Iran a more dispensable and rather troublesome partner for Beijing, said Manochehr Dorraj, a professor of international affairs at Texas Christian University.

When a deal struck between Iran and the six major powers of Britain, China, France, Germany, Russia and the United States partially lifted economic sanctions in exchange for Tehran’s agreement in 2015 to curb its nuclear activities, China quickly moved to expand its trade ties with Iran.

Chinese enterprises in Iran signed $1.5 billion worth of contracts that year. During Chinese President Xi Jinping’s visit to Tehran in January 2016, Iran and China agreed to expand bilateral ties and increase trade to $600 billion by 2025.

But after U.S. President Donald Trump’s administration announced its withdrawal from the Iran nuclear deal in early May 2018 and re-imposed sanctions, Chinese imports of Iranian crude oil fell from 650,000 barrels per day to an average of 140,000 barrels in recent months.

At the same time, China has increased its reliance on crude oil imports from other Middle Eastern countries such as Saudi Arabia and the United Arab Emirates, which have now become China’s biggest trade partners in the region.

China imported a record total of 76.3 million tons of crude oil from Saudi Arabia in the first 11 months of last year, up 53 percent from the same period in 2018. Meanwhile, imports of Iranian oil fell by nearly half to 14.4 million tons during the same period, according to China’s General Administration of Customs.

But despite its shrinking reliance on Iranian oil, China could still stand to lose hundreds of billions of dollars in investments if a military conflict breaks out in Iran, said Li Qingsi, a professor at the School of International Studies at Renmin University in Beijing.

“It’s not easy for China to pull its current investments from Iran. Long-term infrastructure investments like oil wells take dozens of years to get a return on investment, meaning any effort to pull out would result in a loss,” Li explained.

Moreover, analysts warn an armed conflict in Iran would destabilize the entire region, including the Strait of Hormuz, through which passes one-third of global seaborne oil exports — almost a fifth of the oil traded worldwide, according to the U.S. Energy Information Administration.

“In the first half of 2019, China imported 3.3 million barrels per day of crude oil through the Strait of Hormuz, accounting for 33 percent of China’s total crude oil imports. This is relatively high,” said Zuo Xiying, a professor at the same university.

Dorraj, who has published on China-Iran relations, said that if push comes to shove, Iran could either block the narrow strait, which connects the Persian Gulf to the Indian Ocean, or cause major problems for the flow of tankers, “and that’s not something China wants.”

“Over half of China’s energy needs come from the Middle East and North Africa. Major instability in this region will have major negative impacts on China’s continued economic rise,” Dorraj added.

Besides oil, Iran’s geographic position, its possession of the longest coast along the Persian Gulf, its control of the Strait of Hormuz and its role as a gateway to not only Central Asia but potentially to Europe through Turkey makes it very significant for China’s ambitions regarding the Belt and Road Initiative.

“Since onsets of trade wars, China’s investments in all six routes of the initiative declined with the exception of the route that went through the Middle East, Central Asia and West Asia. China’s investments in the Middle East increased,” Dorraj said.

“But because U.S-China political and trade ties loom much larger for China, Beijing doesn’t want to risk a fundamental damage to its relations with the United States over Iran,” Dorraj added.

While trying to preserve the better trade relations marked by the signing of a “phase one” trade deal with the United States this past week, Li said, China is “definitely determined to try every means to prevent an economic disaster in Iran.”