ISLAMABAD -- Pakistan is ready to face any U.S. action in the wake of President Donald Trump's tweet on New Year's Day threatening the country, the defense minister and the army spokesman said.

Defense Minister Khurram Dastagir said Thursday there should be "no doubt or fear as the defense of Pakistan is in competent and strong hands." Earlier, army spokesman Maj. Gen. Asif Ghafoor said Pakistan's response will be in line with the wishes of the Pakistani people.

Mr. Trump has accused Islamabad of providing a safe haven for terrorists. On Monday, he tweeted that the United States had "foolishly" given Pakistan more than $33 billion in aid in the last 15 years and had gotten nothing in return but "lies & 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! — Donald J. Trump (@realDonaldTrump) January 1, 2018

Washington confirmed it will withhold $255 million in U.S. military aid to Pakistan this year, a threat first issued last August when Mr. Trump announced his Afghan policy, which took aim at Pakistan and demanded an end to Islamabad's alleged support for the Afghan Taliban.

Get Breaking News Delivered to Your Inbox

Pakistan denies supporting militants, pointing to its own war against extremist groups battling to overthrow the government.

In contrast to recent visits by U.S. Secretary of State Rex Tillerson and Defense Secretary Jim Mattis who spoke of "engagement and trust-building during their visits here... now President Trump and Vice President Pence are talking of threats, insults and 'putting Pakistan on notice,'" Dastagir said. "We have to develop our strategy cool-headedly, after analyzing the both sides of U.S. administration."

On Wednesday night, Ghafoor told local Geo TV that Pakistan wants to continue cooperation with the U.S. but will not "compromise on national interests and prestige."

"Allies don't fight," he said, adding that "the U.S. should realize how Pakistan has been cooperative in the war against terror."

Pakistan says much of the money it received from the U.S. came as reimbursement in coalition support for services the country provided in the war on terror. It says the U.S. still owes Pakistan $9 billion in the coalition support fund.

The uneasy U.S.-Pakistan relationship has been on a downward spiral since the 2011 U.S. operation that killed Osama bin Laden in his hideout in the Pakistani town of Abbottabad.