Long-time, trusted ally China has defended Pakistan’s record of combating “terrorism” in the wake of a withering attack by US President Donald Trump, who accused Islamabad of ‘lies and deceit’ in an angry tweet on New Year.

Trump said, on Monday, that the United States had “foolishly” handed Pakistan more than $33 billion in aid in the last 15 years and had been rewarded with “nothing but lies and deceit”. “They give safe haven to the terrorists we hunt in Afghanistan, with little help. No more!” Trump wrote on Twitter.

A US National Security Council official later said that the White House did not plan on sending $255 million in aid to Pakistan “at this time” and added “the administration continues to review Pakistan’s level of cooperation.”

Trump’s harsh words drew praise from India and Afghanistan. “His Excellency President Trump has declared the reality. Pakistan has never helped or participated in tackling terrorism,” General Dawlat Waziri, spokesman for the Afghan ministry of Defence, told Reuters.

Jitendra Singh, a junior minister at the Indian Prime Minister’s Office, said Trump’s posturing has “vindicated India’s stand as far as terror is concerned and as far as Pakistan’s role in perpetrating terrorism is concerned”.

However, China gave Pakistan its backing. Chinese Foreign Ministry spokesman Geng Shuang, asked during a regular briefing on Tuesday about Trump’s tweet, did not mention the United States but defended Pakistan’s contributions in counter-terrorism.

“We have said many times that Pakistan has put forth great effort and made great sacrifices in combating terrorism. It has made a prominent contribution to global anti-terror efforts,” he said. “The international community should fully recognise this.”

Pakistani officials say tough US measures threaten to push Pakistan further into the arms of China, which has deepened ties with Islamabad after pledging to invest $57 billion in infrastructure as part of its vast Belt and Road initiative.

Analysts say Trump’s tweet signals that the fraught US-Pakistan ties are likely to worsen in 2018. “The trend lines have not been good, and the tweet gives an indication of the turmoil that awaits in 2018,” said Michael Kugelman, the senior associate for South Asia at the Woodrow Wilson Center.