"They give safe haven to the terrorists we hunt in Afghanistan, with little help," the president wrote. "No more!"
Pakistani leaders, including Prime Minister Shahid Khaqan Abbasi, issued a statement Tuesday that expressed "deep disappointment" in the turn of events, coming at a time when they felt the relationship with the new administration had been on a positive trajectory.
They said that "recent statements and articulation by the American leadership were completely incomprehensible as they contradicted facts manifestly, struck with great insensitivity at the trust between two nations built over generations, and negated the decades of sacrifices made by the Pakistani nation."
Pakistan, the leaders said, would not respond impulsively.
"Despite the unwarranted allegations, Pakistan cannot act in haste," their statement read.
Pakistan has consistently denied that it shelters terrorists from the Taliban-affiliated Haqqani network and others, a position at odds with security assessments. Pakistani leaders say they are being made a scapegoat for U.S. failures in the region.
Officials and analysts in Islamabad said the tweet marks a low point for U.S.-Pakistan relations in recent years.
"The problem is that President Trump tweets every morning as if it's a constitutional necessity," said Khurshid Mahmud Kasuri, Pakistan's former foreign minister. "This is no way to conduct diplomacy."
Critics also charge that Trump did not take into account scores of al-Qaeda and terrorist operatives arrested in Pakistan over the years or the military's risky clearance operations in its northwestern regions.
"It seems this relationship is headed to the point of no return where both countries could opt for different paths," said Amjad Shoaib, a defense analyst and retired Pakistani lieutenant general. "American leaders are not acknowledging Pakistan's sacrifices, and their language is very insulting and shameful."
"Trump says we have done nothing," Shoaib continued. "It's disgusting."
As a reminder of the stakes at hand, a spokesman for China's Foreign Ministry, Geng Shuang, spoke in support of Pakistan in Beijing on Tuesday, saying it has made "tremendous efforts in combating terrorism. . . . The international community should fully acknowledge that."
As U.S. aid to Pakistan has steadily declined in recent years, China has moved forward with a $62 billion infrastructure development project in the region, the China-Pakistan Economic Corridor.
U.S. military and economic aid slated for Pakistan has shrunk to around $345 million this fiscal year, according to the Congressional Research Service. However, U.S. officials decided to place $255 million in aid to Pakistan on hold in August and announced they were going to continue the hold Monday.
Trump's tweet should not have come as a surprise, according to Husain Haqqani, a Pakistani former ambassador to the United States and an analyst with the Hudson Institute.
The Trump administration had been signaling for months that it intended to take a harder line than previous administrations with Pakistan, Haqqani said, with the military convinced its fight in Afghanistan would be easier without Pakistan's tacit support of neighboring terrorist groups.
"What's important is that this is the first time that the president of the United States has directly said what some in the foreign policy and national security community have said for some time," Haqqani said. "The bottom line is that the U.S. is completely frustrated by Pakistan."
Trump called for Pakistan to commit to peace in August, speaking of the "billions and billions" of dollars the United States is paying the country at the same time it is housing terrorists. "This will have to change," Trump said.
Later, Defense Secretary Jim Mattis appeared before Congress and spoke of a willingness to try "one more time" to work with Pakistan. But he may have been disappointed at a meeting with Pakistan's generals in Islamabad last month, Haqqani theorized.
"Mattis did not get the kind of response he was expecting," Haqqani said. "He was expecting to talk to Pakistan general to general, but the Pakistanis kept saying what they've always said — denials."
Trumps' words must now be backed up with consequences, Haqqani said, otherwise they risk being interpreted as little more than hollow warnings.
Gowen reported from New Delhi. Amber Wang in Beijing contributed to this report.