Pakistan’s spy chief offered to resign Friday in the wake of public outrage over the U.S. operation that tracked and killed Osama bin Laden, an incident that humiliated the nation’s army and cast doubt on the capabilities of an intelligence network long believed to be near-omnipotent.

Lt. Gen. Ahmed Shuja Pasha, in what was reportedly highly emotional testimony at a private session before parliament, apologized for the intelligence lapse and said he would leave his post if Prime Minister Yousaf Raza Gillani deemed him unfit for the job, according to lawmakers who attended the session. Pasha said that he had tendered his resignation to Pakistan’s powerful army chief, Gen. Ashfaq Kayani, but that Kayani had refused to accept it, attendees said.

It was unclear early Saturday whether Gillani would dismiss Pasha, who has worked closely with the CIA since assuming his post in 2008. The session, which was called Friday afternoon to give parliamentarians a chance to question Kayani and Pasha about the bin Laden operation, was still underway past midnight.

The briefing — by Pakistan’s two most powerful men before a civilian body that has only nominal influence — was highly unusual. The army, of which Pasha’s Inter-Services Intelligence directorate is a part, has ruled Pakistan for half of its 64-year existence. It still controls most foreign and security policy matters.

As anger over the bin Laden operation has risen, the military has appeared to try to shift blame to the unpopular civilian government, and government officials did little to deflect that.

Yet the killing of bin Laden in a military-dominated town has challenged the army’s authority as rarely before. Pakistan was not informed about the operation, U.S. and Pakistani officials said, nor was it able to stop it once it was underway.

Pakistanis have since deemed the raid a breach of sovereignty and cited it as evidence that the military establishment is unable to protect the nuclear-armed nation or detect dangerous terrorists in its midst. Officials in Washington, meanwhile, have accused Pakistan of harboring bin Laden to protect its influence in Afghanistan.

In what seemed to be a nod to the public anger, Pasha, who spoke for several hours Friday while Kayani remained mostly silent, signaled rare deference to the parliament, noting that politicians had criticized the security services for “ignoring” the parliament, according to one lawmaker, Riaz Fatiana.

Yet Pasha also vigorously defended the ISI, saying — as military officials have done repeatedly in the past week — that it had captured or killed hundreds of al-Qaeda operatives and other high-value terrorists.

“He said it was because of our efforts that al-Qaeda has got weakened over the passage of time,” Federal Information Minister Firdous Ashiq Awan told reporters. She indicated that the government was sympathetic, saying it was time to “boost the morale” of the army and ISI.

Khan is a special correspondent.