It comes as no surprise that Pakistani authorities are looking toward China after the US State Department decided to suspend security assistance to Islamabad on Thursday.

China has been a close regional ally of Pakistan for decades and has often provided the South Asian nation with much-needed financial and diplomatic support. Currently, Beijing is spearheading a nearly $60 billion (€50 billion) China-Pakistan Economic Corridor (CPEC), which is part of its international One Belt One Road initiative. Pakistani officials say the project would boost the country's economy and help alleviate its energy crisis.

Now China also has the opportunity to replace the US as Pakistan's biggest security financier. But it is unclear whether Beijing would be interested in increasing military aid to Islamabad. Also, assuming that China is willing to fill the void left by the US, would its security assistance be equivalent to what Washington had been offering to Islamabad?

Pakistani authorities say they have done 'enough for the US'

Trump's anger

Pakistan finds itself in a tight spot after US President Donald Trump's January 1 tweet, in which he lashed out at the South Asian country for taking billions of dollars in US aid in exchange for "lies and deceit."

"The United States has foolishly given Pakistan more than 33 billion dollars in aid over the last 15 years, and they have given us nothing but lies & deceit, thinking of our leaders as fools. They give safe haven to the terrorists we hunt in Afghanistan, with little help. No more!" Trump wrote on Twitter.

It was not an empty threat. The US State Department on Thursday announced the White House's decision to suspend security assistance to Pakistan worth around $900 million.

State Department spokeswoman Heather Nauert said the decision signaled growing frustration in the White House over Pakistan's failure to target terrorist networks attacking US troops stationed in Afghanistan.

Read more: What Donald Trump can really do to 'rein in' Pakistan

Watch video 01:09 Trump announces new Afghan strategy

Ye Hailin, an expert at the Beijing-based Chinese Academy of Social Sciences, said the US decision to suspend security aid for Pakistan was "unfair."

"It's not that the US provided aid to Pakistan and it received nothing in return. Pakistan has supported the US with logistics and supplies for its troops [in Afghanistan]," Ye told DW.

Read more: Pakistan summons US ambassador to explain Donald Trump tweet

But China's own concerns about Pakistan-based Islamist militants are no secret. With the US out of the picture, China could actually dictate its terms to the Pakistani military and government over the extremism issue.

What can China offer?

A day after Trump's Pakistan tweet, Geng Shuang, China's foreign ministry spokesperson, came to Islamabad's defense.

"Pakistan has made great efforts and sacrifices for combating terrorism and made prominent contributions to the cause of international counterterrorism, and the international community should fully recognize this. We welcome Pakistan and other countries' cooperation on counterterrorism and in other fields on the basis of mutual respect and their joint commitment to the security and stability of the region and the world," Geng said at a press conference this week.

"China stands ready to further deepen cooperation with Pakistan in various fields to bring greater benefits to the two peoples," he added.

Read more: What does China want to achieve in Afghanistan?

But can a strategic partnership with China be a substitute for Pakistan's ties with the US? After all, US troops are stationed in Pakistan's neighborhood, Afghanistan. The US military bases are spread across the region, and Trump is willing to lend more support to Pakistan's archrival India.

"It is true that China is helping Pakistan a lot, but I do not think it can replace the United States. The US has also not sought to sever bilateral ties completely; it just wants Islamabad to pay heed to its demands," Hasan Askari, a Lahore-based security analyst, told DW.

But Amjad Shoaib, a defense analyst, believes Pakistan can do very well without both Chinese and US help.

"We can manage without anybody's help. There could be some problem with the military hardware, but that can be obtained from a host of other countries. We did get some equipment for F16 fighter jets from Turkey. Pakistan also bought tanks from Ukraine, some aircraft from the Scandinavian and other European countries. I think Pakistan can live without US aid," Shoaib told DW.

The terrorism issue

The main issue, however, is not just the security aid. The US demand that Pakistan act decisively against the Afghan Taliban and the Haqqani network won't just go away, and, along with NATO, it will continue to put pressure on Islamabad on this issue. Although the interests of China and Russia clash with those of the US in Afghanistan, that does not mean Beijing and Moscow would want to give a free hand to Pakistan-based militant groups.

Read more: China's Xinjiang Muslims 'require DNA samples' for travel documents

In September last year, the BRICS nations — Brazil, Russia, India, China and South Africa — voiced their concern about Pakistan-based militant groups like Lashkar-e-Taiba and the Haqqani network. Experts dubbed it a diplomatic defeat for Islamabad, which heavily depends on Beijing's support as it becomes increasingly isolated on the world stage.

"The declaration was a clear message to Pakistan that the international community, including China and Russia, is not ready to tolerate Pakistan's jihadi proxies. We must not forget that Islamist groups also pose a threat to China, which is battling a religiously motivated insurgency in its western Xinjiang province," Dr. Aman Memon, an international relations expert at the Islamabad-based Preston University, told DW.

Experts, however, say that despite China's criticism, it would like to keep its leverage over Pakistan.

"As a mediator between Pakistan and Afghanistan, China has always tried to do its best. China's strategic interest in the region is to defeat terrorism," said Chinese expert Ye Hailin.

Read more: China presses Afghanistan-Pakistan rapprochement

China has invested heavily in Pakistan, and that is why it wants peace in at least those areas where its One Belt One Road Initiative project is being implemented, analysts say. China has built a port in the southwestern Pakistani province of Baluchistan as part of its CPEC project to establish overland and sea trade routes to reach Middle Eastern, European and African markets.

China also wants to minimize India's influence in the region by supporting Pakistan, a policy that experts don't think will drastically change in the near future.

Read more: Can India challenge China with new Iranian Chabahar Port?

A double-edged sword

According to a South China Morning Post report on Friday, Trump's decision to cut Islamabad's aid is an opportunity for Beijing.

"In South Asia, there is one clear winner from Donald Trump's tweet tantrums this week: China, which suddenly finds its leverage over Pakistan multiplying as a result of the US president's mood swings," wrote Umair Jamal.

"A month ago, Pakistan pulled out of a mega-dam project under the CPEC, citing the tough financial conditions China set for the project. Should Pakistan become more isolated internationally, as Trump has threatened, it would make it far easier for China to advance the project," Jamal added.

Some experts say that Pakistan will now be at the mercy of China. Previously, Islamabad had leverage over both China and the US regarding jihadis in the region; it has now lost it. Beijing can now force its strictest conditions on Pakistan in terms of security and economic matters.

Read more:

Husain Haqqani: 'US will no longer ignore Pakistan's militant support'

Why is China 'protecting' the Pakistan-based Jaish-e-Mohammad militant group?

Pakistan: One step forward, two steps back

Additional reporting by Sattar Khan, DW's Islamabad correspondent, and DW's Tian Miao.