As Pakistan faces mounting pressure from its neighbors and the United States to clear pro-Taliban elements from its intelligence service, its weak government is struggling to respond in a convincing way.
Last week, American officials alleged that members of Pakistan's powerful intelligence agency, the Directorate for Inter-Services Intelligence (ISI), had helped plan the bombing of the Indian consulate in Kabul, Afghanistan, last month. The claim echoed those lodged by both affected neighbors, India and Afghanistan.
On top of these accusations came reports that a top CIA official had confronted Pakistani leaders with evidence of the ISI's support for militants that the Pakistani Army has been battling in the country's restive northwest tribal areas.
The timing of the allegations against the ISI is weighing heavily on Pakistan, which has struggled to assuage its neighbors' and the US's complaints.
While it denies its intelligence agents' involvement in the July bombing, it has acknowledged that the ISI still includes agents who sympathize with Islamic militants.
To defuse escalating diplomatic tensions, Pakistani Prime Minister Yousaf Raza Gilani met last weekend with Afghan and Indian leaders on the sidelines of the South Asian Association for Regional Cooperation summit to reiterate Pakistan's commitment to fighting terror.
In talks Saturday with his Indian counterpart Manmohan Singh, Mr. Gilani promised to investigate the ISI's alleged role in the Kabul bombing. The next day, in a meeting with Afghan President Hamid Karzai, he also agreed to work towards "developing a common strategy" to overcome the challenges terrorism poses to the stability of both of their countries.
The reports from the US surfaced just as Gilani was completing his first visit to Washington, where he met with President Bush. The tour was widely criticized for its failure to ease US growing concerns about Pakistan's role in the war on terror. A column in the Daily Times, a national English-language newspaper, called the trip an "unmitigated disaster."
Even before Gilani's visit to the US, the Pakistani government appeared to be taking action to rein in the pro-militant influence in its intelligence service. In a surprising move one day before Gilani arrived in the US, it issued a proclamation that sought to bring the ISI and another secret-service agency under the control of a government ministry.
But the hurried decision proved ineffective, signaling how much of an uphill battle the government faces. The ISI balked, and the proposal was withdrawn that same day.
Through this move, "the government may have wanted to impress on the Americans that they have a firm control over the military and intelligence agencies," says Hassan Askari Rizvi, the author of "Military, State, and Society in Pakistan." "But it was a major miscalculation, and it backfired badly," he adds.
Former Army general and security analyst Talat Masood says the retraction showed "where the real power still is."
Local media reported soon after that President Musharraf called the ISI "the first defense line of Pakistan," and suggested that any attempt to curtail its powers was a conspiracy to weaken Pakistan.
Officially, the ISI is answerable directly to the civilian government, but experts say that the agency has always followed the lead of the Pakistan Army.
While the precise chain of command and the limits of the agency's influence are debated, the history of close cooperation between the ISI and the Taliban is long and well documented.
The ISI and the CIA worked closely with Afghan mujahideen during the 1980s and armed many of the groups that later joined together to form the Taliban government in Afghanistan.
While the CIA receded after the Soviet withdrawal from Afghanistan, Pakistan continued to support the Taliban regime until 2001, when the US asked Pakistan to stop. Pakistan did so officially, but elements in its security establishment are believed to have continued their support for some Taliban leaders.
"It's possible that there are certain individuals in the agencies who have developed ideological sympathies with the Islamic militants," says Professor Rizvi, "but there is more likely a real strategic calculation being made by the agencies and military here." These agencies, he says, might support the Taliban more as a way to counter longtime rival India's growing influence in Afghanistan.
But now that Pakistan is in the global spotlight of the war on terror and militants are stepping up attacks within its borders, a policy of supporting militancy is being increasingly debated at home. This week at least 136 militants, soldiers, and civilians have died in battles between security personnel and self-proclaimed Taliban in northwestern Pakistan, which has seen intermittent fighting and a number of failed cease-fires.
"One can assume," warned an editorial in Dawn, the country's largest English daily, "that the ISI understands the country's strategic and political interests well enough to refrain from undertaking such unwise adventures," as supporting the Taliban militancy.
"The fact that the ISI remains so nontransparent is adding to suspicion of the organization at home and abroad," says Mr. Masood. But as long as this government doesn't stand up and start taking responsibility, it will never be able to exert control."