ISLAMABAD — Secretary of State Rex W. Tillerson stopped in Islamabad on his way to New Delhi on Tuesday to deliver what he hoped would be a sobering message to Pakistan: Stop funding or providing shelter to terrorist groups. Now.

It is a message the United States has been giving the Pakistanis in various forms since the Sept. 11 attacks, and it is one the Pakistanis have by turns harkened to, bristled at and shrugged off — sometimes in the same meeting — for years.

In tackling the deeply dysfunctional relationship between the United States and Pakistan, the Trump administration is finding that it is not unlike some difficult marriages: all but impossible to fix, but also impossible to end.

There were few signs on Tuesday that this 16-year-old dynamic had changed.

Mr. Tillerson met with three of Pakistan’s top leaders at the elegant prime minister’s residence in Islamabad: Prime Minister Shahid Khaqan Abbasi; the foreign minister, Khawaja Muhammad Asif; and, most important, the Army’s chief of staff, Gen. Qamar Javed Bajwa.