As neighbors and reporters swarmed the streets around Osama bin Laden’s compound this week, men in sunglasses and white tunics lurked about on motorbikes. Residents presumed they were Pakistani intelligence agents, there to keep tabs on who spoke to whom.

That counted as nothing unusual in a nation where the security establishment has cultivated an image as a nearly omnipresent force that is watchful above all of foreigners who go near military installations.

Yet given the choice between pleading incompetence or complicity in bin Laden’s years-long stay in the garrison city of Abbottabad, Pakistani authorities have opted for the former. It is an explanation that strains credulity for many international observers, including U.S. policymakers, who have demanded an investigation into whether Pakistan sheltered the al-Qaeda leader.

Pakistanis have been more inclined to believe that their government was unaware of bin Laden’s presence. But the admissions of error by Pakistani authorities have prompted unusual questioning of a central tenet of the national narrative: that the military and intelligence services are untouchable guarantors of Pakistan’s safety.

Some of the discord centers on the United States, which the Pakistani government rebuked for carrying out an “unauthorized” operation when it choppered in Navy SEALs to raid bin Laden’s sanctuary.

But in a development that some analysts hope will buoy Pakistan’s weak civilian government, critics — including hawkish retired generals — are also questioning the ability of the nation’s military to protect nuclear facilities, its large defense budget and even its perception of India as an archenemy.

Lt. Gen. Hamid Gul — a nationalist former chief of the nation’s primary spy agency and a vocal backer of the Afghan Taliban — has decried Pakistan’s intelligence capabilities. Letters to newspapers have called for explanations from the military, both for bin Laden’s presence and the undetected U.S. raid. MAK Lodhi, a columnist for the News, an English-language newspaper that typically champions the army, called bin Laden’s killing “shameful for every Pakistani, particularly our intelligence outfits, which bothered little to capture the most wanted and hated man on earth.”

Many here assume that the Pakistani military took part in the killing and is withholding information about its parti­cipation, perhaps to prevent a backlash from Islamist insurgents, who have targeted the Pakistani state in recent years.

“I think the Pakistanis did have some information and idea about the operation. But if it is accepted that they didn’t, it’s very disgusting and shameful on their part,” said Asad Munir, a retired senior official with the Inter-Services Intelligence (ISI) directorate, Pakistan’s top spy agency. “If they didn’t, they need to put their house in order.”

Pakistan, juggling criticism from various corners, has scrambled to soften the damage through at times mixed messages. While insisting that they had no knowledge of the raid, Pakistani officials maintained that their intelligence cooperation since 2001, and particularly over the past two years, helped lead the United States to bin Laden and dozens of other al-Qaeda operatives in Pakistan.

In 2003, an ISI official said, spies looking for Abu Faraj al-Libi, another al-Qaeda member, raided a construction site that would become the bin Laden compound in Abbottabad. They found nothing at the time, he said.

“We are not apologetic, not in the least, for this oversight, omission, for want of a better word, a failure,” the official said. “Why is it that 10 years’ work goes down the drain with just this one?”

Other security officials emphasized that the ISI was more concerned with homegrown militants than with bin Laden, whom, they noted, the CIA took a decade to find. Prime Minister Yousaf Raza Gillani, speaking in Paris on Wednesday, said this was an intelligence failure of “the whole world, not Pakistan alone.”

Pakistani military officials, meanwhile, also focused on the superior technological capabilities of the United States, which, they said, had helped the CIA find bin Laden and allowed U.S. helicopters to slip in and out of Pakistan unnoticed.

“Pakistan is spending billions of dollars on the military and the defense budget, and yet they are incapable of intercepting incursions into Pakistan?” asked Javed Hussain, a retired army brigadier and security analyst. “The authorities will have to do something about it, and soon, before they lose total credibility.”

The Pakistani military, even while pleading ignorance about the U.S. raid, has argued that it is fully capable of protecting the nation’s nuclear weapons.

“You give precedent to the area where you expect the threat from, and therefore you take adequate security measures to ward off that threat,” said Maj. Gen. Athar Abbas, the chief military spokesman. “This place was not considered as a very highly vulnerable area.”

But critics — even some within the government — say outrage about U.S. violations of national sovereignty or bin Laden’s hideout drives the debate away from graver questions about the growth of Islamist radicalism in Pakistan and possible state support for it. One official said Pakistanis should be asking why the dozens of al-Qaeda members arrested in their nation came here in the first place or why the military is more focused on India than on terrorism.

“Didn’t bin Laden violate Pakistani sovereignty? He’s not a Pakistani citizen,” the official said. “The questions that need to be asked are, ‘Why did he come to this country? Why did he think this country was a safe haven?’ ”

Special correspondent Shaiq Hussain in Islamabad contributed to this report.