On Friday, Islamabad’s High Court, noting that Colonel Hall did not have full diplomatic immunity, left it up to the government to decide whether to add his name to a travel ban list. Also on Friday, Pakistan placed travel restrictions on United States diplomats based in the country, the latest in a series of retaliatory measures that threaten to plunge already strained relations to their worst level in years.

The restrictions in Pakistan were imposed on the same day that the United States barred diplomats working at the Pakistan Embassy in Washington from traveling outside a 25-mile radius around the city without approval.

The United States has long complained that the police and security officials in Pakistan frequently harass American diplomats and their staff with traffic stops and citations that require considerable time and effort to resolve. Six weeks ago, the State Department threatened to impose a travel restriction on Pakistan’s Washington diplomatic corps if the harassment did not end by Friday.

U.S.-Pakistan relations have worsened since January, when the Trump administration announced it had suspended nearly all of the $1.3 billion in annual security aid given to Pakistan. That came days after President Trump complained on Twitter that Pakistan had “given us nothing but lies & deceit” and accused it of providing “safe haven to the terrorists we hunt in Afghanistan.”

The Trump administration has also sought to strengthen ties with India, Pakistan’s bitter rival.

“This is a development that could well develop into a full-blown crisis for relations if it’s not resolved soon,” said Michael Kugelman, a South Asia specialist at the Woodrow Wilson Center in Washington. “Since Joseph is understood to have diplomatic immunity, Pakistan’s refusal to let him leave the country will be seen by Washington as a wholly unjustifiable and illegal act.”