The Obama administration has sharply warned Pakistan that it must cut ties with a leading Taliban group based in the tribal region along the Afghan border and help eliminate its leaders, according to officials from both countries.

In what amounts to an ultimatum, administration officials have indicated that the United States will act unilaterally if Pakistan does not comply.

The message, delivered in high-level meetings and public statements over the past several days, reflects the belief of a growing number of senior administration officials that a years-long strategy of using persuasion and military assistance to influence Pakistani behavior has been ineffective.

White House officials and Defense Secretary Leon E. Panetta are said to be adamant in their determination to change the approach, according to officials who spoke on the condition of anonymity about internal administration deliberations.

Although he declined to provide details, Panetta told reporters at the Pentagon on Tuesday that “we are going to take whatever steps are necessary to protect our forces” in Afghanistan from attacks by the Haqqani network, which has had a long relationship with Pakistan’s intelligence service.

“We’ve continued to state that this cannot happen,” Panetta said of the Haqqani network strikes, including a Sept. 13 attack on the U.S. Embassy in Kabul.

As Panetta spoke, new CIA Director David H. Petraeus was holding an unpublicized private meeting in Washington with his Pakistani counterpart, Lt. Gen. Ahmed Shuja Pasha. Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, who met with Pakistan’s army chief in Madrid on Friday, said that the “proxy connection” between Pakistani intelligence and the Haqqani network was the focus of those discussions.

Secretary of State Hillary Rodham Clinton is among a minority of administration officials still willing to express public sympathy for Pakistan’s weak civilian leaders as they face a growing threat from domestic terrorism and the politically powerful military.

But during a 31 / 2-hour meeting in New York on Sunday with her Pakistani counterpart, she warned that Pakistan is fast losing friends in Washington, according to one official deeply familiar with the session.

Clinton left the meeting with Pakistan’s assurance that “they recognize that these people are threats to Pakistan as well, and that no one should think that their relationship with the Haqqanis was more important than their relationship with the United States,” a senior administration official said.

But another administration official emphasized the severity of the U.S. officials’ warning. “We are expressing the firm conviction that things have to change . . . in Miranshah and in Islamabad, as well,” this official said. Miranshah is the main population center in Pakistan’s North Waziristan region, where the Haqqani leadership is based. CIA drone attacks elsewhere in the region have avoided the city for fear of civilian casualties.

“It’s a reality that they’re not living in tents in the open,” the official acknowledged. But with Pakistani cooperation, “we know that there are ways to get at extremist leaders anywhere,” the official said, citing the past capture of senior al-Qaeda leaders during joint intelligence operations in the far larger cities of Karachi and Quetta.

As U.S. commanders have claimed progress against the Taliban in southern Afghanistan, the allied Haqqani group has stepped up its efforts in the eastern part of the country and is now considered the principal threat to U.S. forces.

The organization was formed by Jalaluddin Haqqani as one of the resistance groups fighting the Soviet occupation of Afghanistan in the 1980s, with U.S. and Pakistani assistance. In the Afghan civil war that followed, Haqqani sided with the Taliban forces that took power in Kabul in 1996. His fighters fled after the Taliban overthrow in late 2001 to Pakistan, where U.S. intelligence officials think they are in close coordination with al-Qaeda forces.

Pakistani intelligence maintained close connections to the network, now operationally led by Sirajuddin Haqqani, the founder’s son, as a hedge against the future in Afghanistan.

Two years ago, President Obama, in a letter to Pakistani President Asif Ali Zardari, warned that Pakistan’s intelligence ties to extremist groups, including the Haqqanis, could “not continue.” At the time, Obama promised an expanded strategic relationship with Pakistan in exchange for action.

Since then, U.S. military and civilian aid to Pakistan has increased significantly, and the administration has repeatedly described Pakistan as a crucial partner in the fight against the Taliban in Afghanistan. U.S. diplomats have tried to foster working relationships between the often-estranged Afghan and Pakistani governments, as well as between Pakistan and India, its historical adversary.

Intelligence and counterterrorism cooperation between the two governments has ebbed and flowed over that period, reaching a low point this year with several events, including the shooting death of two Pakistanis by a CIA contractor in January and the unilateral U.S. military raid that killed Osama bin Laden in his suburban Pakistani hideout in May.

Several months of open estrangement were followed by a slow climb back to cooperation — although not against the Haqqanis — by late August. CIA officials noted some improvement in the intelligence relationship, although Pakistan has continued to refuse entreaties for long-term, multiple-entry CIA visas. Even as they have traded public barbs, U.S. and Pakistani military officials reached a tentative agreement this week to return at least 100 of about 200 U.S. military trainers whom Pakistan expelled earlier in the year.

But recent attacks attributed to the Haqqani network in eastern Afghanistan, culminating in the embassy assault last week, appear to have abruptly changed attitudes within the senior levels of the administration.

On Saturday, in a message approved at senior levels in Washington, Cameron Munter, the U.S. ambassador to Pakistan, told a radio interviewer in Islamabad that the United States had evidence “linking the Haqqani network to the Pakistan government.”

Although U.S. officials said they are continuing to look for a way forward with Pakistan, at least two factors are likely to narrow the administration’s options. As the conflict continues, Pakistan has fewer friends in Congress, where budget-cutting zeal increasingly coincides with pressure to stop funding assistance to Pakistan.

At the same time, the administration has grown increasingly determined to ease its way out of the Afghanistan conflict, and has diminishing patience for what it views as Pakistani impediments.

“What’s different is that we have begun a transition” in Afghanistan, one administration official said. “We’ve got a credible program to build an effective Afghan security force, and transition is happening, whether people like it or not.”

“For those who are wedded to the past — past relationships, past support structures — and for those who would destabilize Afghanistan,” the official said, “they’ve got to take account of the fact that things are different.”