The killing of Osama bin Laden in a Pakistani city dominated by the military has spotlighted a conundrum that Western counterterror agencies have grappled with for years: Is Pakistan's powerful intelligence service an ally, an enemy or a mix of both?

This time the debate is likely to take place in public, not behind the closed doors of national security outposts in Washington. In fact, White House homeland security adviser John Brennan seemed to confront the issue head-on Monday when he said that the presence of the world's most wanted man in a fortress-like compound near the homes of retired generals and a military academy raises questions that the Pakistani government must answer.

The Obama administration took the extraordinary step of keeping Sunday's commando raid secret from Islamabad. Although Obama cited "counterterrorism cooperation with Pakistan" as a factor in the successful hunt for bin Laden, U.S. officials have not given details on the extent and nature of that Pakistani assistance.

The ISI has been suspected of playing a double game in previous cases: the murder of Wall Street Journal reporter Daniel Pearl in 2002, the mysterious escape from Pakistani custody in 2007 of an Al Qaeda operative accused in the London transport bombings and a plot to bomb U.S.-bound commercial flights, charges of ISI involvement in the 2008 Mumbai attack and recent allegations by top military brass that the ISI supports militant networks fighting U.S. troops in Afghanistan.

ISI collusion with bin Laden has yet to be proved. Pakistani officials have taken credit for helping the U.S. find the Al Qaeda leader. They point out that hundreds of ISI officers have died in fighting with militants and that Al Qaeda has carried out bloody attacks on the Pakistani state.

In the past, small, trusted units of the Pakistani security forces have worked with U.S. counterterror agencies to capture fugitives such as Ramzi Binalshib, a Sept. 11 suspect arrested in Karachi in 2003 after a fierce gun battle. But now there are fears that the leadership of the ISI, the dominant institution in Pakistan, has lost control not only of its militant allies but of the spy agency itself.

"I grow ever more cautious of talking of ISI as a coherent organization," said a veteran British counterterror official who requested anonymity because of the sensitivity of the issue. "The individual directorates are remarkably autonomous and even work at cross purposes. So you are dealing with one directorate that works side-by-side with us...But then you have another running proxy operations all over South Asia. It's remarkable how little strategic command and control is exercised from the top."

The relationship with Pakistan is "layered and complex," said a senior U.S. intelligence official. Public statements sometimes contrast with the reality on the ground because the Pakistani government doesn't want to be portrayed as a lackey of Washington. Experts cite the tacit agreement in which Islamabad has secretly accepted the U.S. drone strikes that have decimated Al Qaeda's leadership in the northwest tribal areas, while complaining about the missile attacks. Not everything is what it seems in the Pakistani labyrinth.

"The ISI has a terrible image with us -- ambiguous, untrustworthy, autonomous from the civilian government -- and that's also been the view our American colleagues have expressed for years," a senior European intelligence official said. "But there are two schools of thought here. One is that the Pakistanis collaborated with the Americans to track bin Laden down. The other is that they protected him as long as they could and he fell because of some kind of betrayal."

Did the Pakistani security forces protect bin Laden? And if they did, why?

The ISI has long had a coterie of mid-level and even senior officers with strong sympathies for the militant groups that the agency has used as proxies in South Asia. That solidarity combines Islamic extremist with a nationalistic imperative to combat India, Pakistan's arch-foe, and Indian allies such as the United States.

The U.S. investigation of the Mumbai attacks showed that a number of Pakistani Army captains, majors and other officers have crossed the line to join the Taliban and the Lashkar-e-Taiba terrorist group and participated in combat against NATO troops in Afghanistan in recent years.

A suspect recently indicted in Chicago in the Mumbai probe is Abdurrehman Syed, a former Pakistani Army major and a close associate of David Coleman Headley, a U.S. citizen who has confessed to working for the ISI, Lashkar and al Qaeda.

"Abdur Rehman is directly in touch with the top or brass of al Qaida including Ilyas Kashmiri who is now the number 3 in the al Qaida hierarchy in Pakistan," said a report by the India's National Investigation Agency on the interrogation of Headley. "Rehman has met Osama a number of times. [Rehman] once told Headley that his set up has been given the name Jund-ul-fida (Army of Fidayeens) by Osama bin Laden himself."

"Kashmiri knew Ijaz's brother who happened to be an ISI agent," the interrogation report says.

If bin Laden had protection, it could have come from a murky underworld where terrorists, retired officers and serving officers all converge, experts say. And if that kind of collusion is exposed, the British official said, "It will be a shock to the Pakistani system."

The killing of Osama bin Laden in a Pakistani city dominated by the military has spotlighted a conundrum that Western counterterror agencies have grappled with for years: Is Pakistan's powerful intelligence service an ally, an enemy or a mix of both?

This time the debate is likely to take place in public, not behind the closed doors of national security outposts in Washington. In fact, White House homeland security adviser John Brennan seemed to confront the issue head-on Monday when he said that the presence of the world's most wanted man in a fortress-like compound near the homes of retired generals and a military academy raises questions that the Pakistani government must answer.

The Obama administration took the extraordinary step of keeping Sunday's commando raid secret from Islamabad. Although Obama cited "counterterrorism cooperation with Pakistan" as a factor in the successful hunt for bin Laden, U.S. officials have not given details on the extent and nature of that Pakistani assistance.

The ISI has been suspected of playing a double game in previous cases: the murder of Wall Street Journal reporter Daniel Pearl in 2002, the mysterious escape from Pakistani custody in 2007 of an Al Qaeda operative accused in the London transport bombings and a plot to bomb U.S.-bound commercial flights, charges of ISI involvement in the 2008 Mumbai attack and recent allegations by top military brass that the ISI supports militant networks fighting U.S. troops in Afghanistan.

ISI collusion with bin Laden has yet to be proved. Pakistani officials have taken credit for helping the U.S. find the Al Qaeda leader. They point out that hundreds of ISI officers have died in fighting with militants and that Al Qaeda has carried out bloody attacks on the Pakistani state.

In the past, small, trusted units of the Pakistani security forces have worked with U.S. counterterror agencies to capture fugitives such as Ramzi Binalshib, a Sept. 11 suspect arrested in Karachi in 2003 after a fierce gun battle. But now there are fears that the leadership of the ISI, the dominant institution in Pakistan, has lost control not only of its militant allies but of the spy agency itself.

"I grow ever more cautious of talking of ISI as a coherent organization," said a veteran British counterterror official who requested anonymity because of the sensitivity of the issue. "The individual directorates are remarkably autonomous and even work at cross purposes. So you are dealing with one directorate that works side-by-side with us...But then you have another running proxy operations all over South Asia. It's remarkable how little strategic command and control is exercised from the top."

The relationship with Pakistan is "layered and complex," said a senior U.S. intelligence official. Public statements sometimes contrast with the reality on the ground because the Pakistani government doesn't want to be portrayed as a lackey of Washington. Experts cite the tacit agreement in which Islamabad has secretly accepted the U.S. drone strikes that have decimated Al Qaeda's leadership in the northwest tribal areas, while complaining about the missile attacks. Not everything is what it seems in the Pakistani labyrinth.

"The ISI has a terrible image with us -- ambiguous, untrustworthy, autonomous from the civilian government -- and that's also been the view our American colleagues have expressed for years," a senior European intelligence official said. "But there are two schools of thought here. One is that the Pakistanis collaborated with the Americans to track bin Laden down. The other is that they protected him as long as they could and he fell because of some kind of betrayal."

Did the Pakistani security forces protect bin Laden? And if they did, why?

The ISI has long had a coterie of mid-level and even senior officers with strong sympathies for the militant groups that the agency has used as proxies in South Asia. That solidarity combines Islamic extremist with a nationalistic imperative to combat India, Pakistan's arch-foe, and Indian allies such as the United States.

The U.S. investigation of the Mumbai attacks showed that a number of Pakistani Army captains, majors and other officers have crossed the line to join the Taliban and the Lashkar-e-Taiba terrorist group and participated in combat against NATO troops in Afghanistan in recent years.

A suspect recently indicted in Chicago in the Mumbai probe is Abdurrehman Syed, a former Pakistani Army major and a close associate of David Coleman Headley, a U.S. citizen who has confessed to working for the ISI, Lashkar and al Qaeda.

"Abdur Rehman is directly in touch with the top or brass of al Qaida including Ilyas Kashmiri who is now the number 3 in the al Qaida hierarchy in Pakistan," said a report by the India's National Investigation Agency on the interrogation of Headley. "Rehman has met Osama a number of times. [Rehman] once told Headley that his set up has been given the name Jund-ul-fida (Army of Fidayeens) by Osama bin Laden himself."

"Kashmiri knew Ijaz's brother who happened to be an ISI agent," the interrogation report says.

If bin Laden had protection, it could have come from a murky underworld where terrorists, retired officers and serving officers all converge, experts say. And if that kind of collusion is exposed, the British official said, "It will be a shock to the Pakistani system."