Hong Kong (CNN Business) Last weekend's drone attack on Saudi Arabian oil facilities sent shockwaves through global energy markets and the price of crude spiking.

While Saudi authorities have pledged that production will soon be back on track and oil prices have fallen, the attack underscored China's particular vulnerability to disruption in oil supplies.

As the world's largest crude oil importer, China's heavy dependence on other countries for energy has influenced much of its foreign policy. Beijing is trying to reduce that dependence, butthe needs of its growing economy and a trade war with the United States have put it in an awkward position. It's buying more Saudi oil than it has done for years.

Less American oil, more Saudi oil

China has traditionally purchased the bulk of its oil from Russia, Iran , Saudi Arabia, and the United States.But it has been forced to cut back on at least two of those sources.

the escalating trade war and the Chinese imports of US oil plunged 76% in the first half of 2019 because ofthe escalating trade war and the threat of tariffs , according to data from customs authorities. Imports from Iran also dropped sharply due to sanctions re-imposed by the Trump administration on countries buying Iranian crude.

has become China's biggest supplier in recent months, increasing its share of Chinese imports from 14% in 2018 to 18% so far this year, and overtaking Russia for the first time in more than five years, according to a report by financial data provider Refinitiv. That gap has largely been closed by Saudi Arabia. The world's largest oil exporter has become China's biggest supplier in recent months, increasing its share of Chinese imports from 14% in 2018 to 18% so farthis year, and overtaking Russia for the first time in more than five years, according to a report by financial data provider Refinitiv.

Last Saturday's attack, which knocked out about half of Saudi oil production, left China worried.

"We are very concerned about the attack's potential impact on the international crude supply and price stability," Hua Chunying, a spokeswoman for China's Ministry of Foreign Affairs, said at a press conference on Tuesday.

Not enough reserves

Beijing has repeatedly emphasized the need to diversify its energy sources.

"Our most important task is to ensure energy security," Zhang Jianhua, director of China's National Energy Administration, said in a statement posted on the website of the Chinese government last month. "How to ensure national energy security and economic and societal growth is always the No. 1 issue for our energy development," he said.

In 2018, China imported nearly 70% of its oil, according to a paper released earlier this year by the China Petroleum Enterprise Association. The association expects that figure to rise to 72% in 2019.

As its economy grows, China will need more oil, the paper said. But domestic production has been going backwards and efforts to establish strategic reserves have fallen short of targets.

Last year, China's crude oil production decreased 1.3% to 189 million metric tons, a third straight year of decline. That's less than one third of its annual consumption of 648 million tons in 2018.

"China's crude imports will continue to increase in 2019," the paper said.

At a press conference on Friday, Zhang from the National Energy Administration said Beijing is trying to reduce China's dependence on foreign oil. He said the government will increase investments and support exploration to boost domestic oil production.

China's oil production should increase slightly to reach 191 million tons by the end of 2019 and 200 million tons in 2022, he added.

China doesn't release data about its oil reserves. But the statistics authority said at the end of 2017 that the country had established nine major oil reserve bases across the country, with a combined capacity of 37.7 million tons. Going by the 2018 consumption figures, that would only satisfy the country's needs for about three weeks.

had set a goal of increasing its oil reserves to around 85 million tons by 2020. That's almost as much as the United States keeps in its In 2008, the Chinese governmenthad set a goal of increasing its oil reserves to around85 million tons by 2020. That's almost as much as the United States keeps in its Strategic Petroleum Reserve — the world's largest backup oil supply.

Weaning itself off foreign oil

The Chinese government has also been trying various means to achieve energy independence.

In its 13th five-year plan, China's policy blueprint for 2016 to 2020, the government established a goal of becoming at least 80% self sufficient in energy by 2020.

In 2014, Chinese President Xi Jinping proposed a New Energy Security Strategy, calling for the country to diversify sources of energy imports, foster cordial relations with major oil and gas producers, boost alternative energy development as well as encouraging technological innovation in nuclear power and electric vehicles.

But in an opinion piece published in June, Lin Boqiang, director of the China Center for Energy Economics Research at Xiamen University, said China is finding it hard to cut its reliance on oil because its vast transportation industry accounts for 70% of consumption.

The most effective way for China to boost energy security is to accelerate the development of electric vehicles , high-speed railways, and transit systems that are more efficient, according to Lin.

Higher gas prices

China is already struggling with a slowing economy, a long drawn out trade war with the United States and a pork crisis that has pushed up inflation. Volatility in the global oil industry will only make things worse.

High oil prices could propel inflation further upward and leave policymakers less leeway to reduce the severity of the economic downturn.

On Monday, the People's Bank of China made a surprise move by keeping a key loan rate steady. Markets previously thought the central bank would reduce the rate given poor economic readings for last month.

Analysts said rising inflationary pressure is limiting the room for the central bank to cut rates. Cutting interest rates stimulates growth, but it also stokes inflation.

China's consumer price index rose 2.8% in August, driven mainly by a spike in pork prices after a bout of African swine fever wiped out roughly a third of China's pigs.

China has dipped into its national pork reserves to stave off that crisis, but it doesn't have the same ability with its oil reserves.

And with Chinese consumers already paying more for a variety of goods thanks to higher US tariffs, a jump in the price of gasoline will only add to their woes.

The price increases were due to "recent changes in international oil prices," according to a statement by the National Development and Reform Commission, the nation's top economic planner. The commission sets China's domestic fuel prices by issuing price guidance every few weeks.