Foreign Minister Khawaja Asif dismissed Donald Trump's Twitter outburst about Pakistan earlier this week, but U.S. Ambassador to the UN Nikki Haley confirmed Tuesday afternoon that the administration is withholding $255 million US that had been earmarked for Pakistan.

In a withering attack, Trump on Monday said the United States had "foolishly" handed Pakistan more than $33 billion US 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.

Trump's harsh words drew praise from Pakistan's old foe, India, and neighbouring Afghanistan, but long-time ally China defended Pakistan's record of combating "terrorism."

Haley said the $255 million had been earmarked for military and other assistance to Pakistan. She said the U.S. has tired of the "double game" that Pakistan has played with her country in recent years.

"They work with us at times, and they also harbour the terrorists that attack our troops in Afghanistan," she said. "That game is not acceptable to this administration."

Haley did not indicate if there were specific preconditions Pakistan needed to achieve to receive the financial aid.

Washington had signalled to Pakistan in recent months that it will cut aid and enact other punitive measures if Islamabad does not stop helping or turning a blind eye to the Haqqani network militants who carry out cross-border attacks in Afghanistan.

In August, the administration had said it was delaying the payment.

Relations between United States and its uneasy ally Pakistan have been strained for many years over Islamabad's alleged support for Haqqani network militants, who are allied with the Afghan Taliban.

Pakistani protesters burn banners showing U.S. President Donald Trump in Hyderabad, on Tuesday, a day after Trump's latest criticism of the country. (Pervez Masih/Associated Press)

The United States also alleges senior Afghan Taliban commanders live on Pakistani soil. In 2016, the then-Taliban leader Mullah Mansour was killed by a U.S. drone strike inside Pakistan and in 2011, al-Qaeda leader Osama bin Laden was found and killed by U.S. troops in the Pakistani garrison town of Abbottabad.

Angry reaction in Pakistan to tweet

Most recently, a New York Times report emerged last week that the U.S. was upset its intelligence officials weren't allowed access to a militant Pakistan detained in connection with the October rescue of American Caitlan Coleman and Canadian husband Joshua Boyle, who had been held in captivity for a number of years after being kidnapped in Afghanistan.

Islamabad bristles at the suggestion it is not doing enough in the war against militancy, saying that since 2001, Pakistan has suffered more than the United States from militancy as casualties at the hands of Islamists number in the tens of thousands.

Pakistan Prime Minister Shahid Khaqan Abbasi on Tuesday chaired a National Security Committee meeting of civilian and military chiefs, focusing on Trump's tweet. The meeting, which lasted nearly three hours, was brought forward by a day and followed an earlier meeting of army generals.

Hundreds of supporters of the Jamaat-ud-Dawa group chanted against Trump at a rally in Lahore and called for Haley's removal. Jamaat-ud-Dawa is headed by Hafiz Saeed, the founder of a militant group blamed for the 2008 Mumbai attacks, who lives openly in Pakistan despite a $10 million reward offered by the U.S. State Department.

Pakistani Foreign Minister Khawaja Asif, seen on Oct. 4 while visiting Secretary of State Rex Tillerson at the State Department in Washington, downplayed Donald Trump's tweet. (Cliff Owen/Associated Press)

As well, U.S. Ambassador to Pakistan David Hale was summoned by the foreign office Islamabad on Monday to explain Trump's tweet, media there said.

Pakistani Foreign Minister Asif dismissed Trump's comments as a political stunt borne out of frustration over U.S. failures in Afghanistan, where Afghan Taliban militants have been gaining territory and carrying out major attacks.

"He has tweeted against us [Pakistan] and Iran for his domestic consumption," Asif told Geo TV on Monday. "He is again and again displacing his frustrations on Pakistan over failures in Afghanistan as they are trapped in dead-end street in Afghanistan."

Asif added, hours before Haley spoke, that Pakistan did not need U.S. aid.

Pakistan was one of the countries that condemned the Trump decision to recognize Jerusalem as the capital of Israel, with the eventual goal of moving the U.S. embassy there from Tel Aviv.

Haley said the withholding of aid was based on Pakistan's approach to dealing with terrorism, not the reaction to the Jerusalem decision.

China a benefactor to Islamabad

Afghan and Indian officials applauded Trump's abrasive comments.

"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."

But China gave Pakistan its backing.

Chinese Foreign Ministry spokesman Geng Shuang, asked during a regular briefing about Trump's tweet, did not mention the United States but defended Pakistan's contributions in counter-terrorism.

President Donald Trump praised Pakistan after American Caitlan Coleman and her Canadian husband Joshua Boyle were freed from militants in October, but has otherwise threatened to cut off military aid to the country. (Evan Vucci/Associated Press)

"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 U.S. 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 in the China-Pakistan Economic Corridor (CPEC) as part of its global Belt and Road initiative.