Opposition politicians have stepped up their criticism of Pakistan's leaders over the killing of bin Laden in a raid by U.S. special forces in a northern Pakistani town on May 2.
Pakistan welcomed the death of bin Laden, who plotted the Sept. 11, 2001, airliner attacks on the United States, as a step in the fight against militancy but also complained that the raid was a violation of its sovereignty.
The fact that bin Laden was found hiding in the garrison town of Abbottabad, 50 km (30 miles) from the capital, has led to accusations that Pakistani security agencies were either incompetent or sheltering the world's most wanted man.
"Allegations of complicity or incompetence are absurd," Gilani said in a televised address to parliament, adding that it was disingenuous for anyone to accuse Pakistan, including its spy agency, of "being in cahoots" with the al Qaeda network.
The U.S. raid has added to strains in ties between Islamabad and Washington, which are crucial to combating Islamist militants and to bringing stability to Afghanistan.
The United States has stopped short of accusing Pakistan of providing shelter to bin Laden but Islamabad is under pressure to explain how bin Laden found refuge.
Gilani warned that unilateral actions such as the U.S. Navy SEALs swoop on bin Laden's hideout ran the risk of serious consequences, but he added that Pakistan attached high importance to its relations with the United States.
Pakistan's main opposition party has called on Gilani and President Asif Ali Zardari to resign over the breach of sovereignty by U.S. special forces who slipped in from Afghanistan on helicopters to storm the compound where bin Laden was holed up.
"I think it is a big blow to Pakistan's sovereignty, Pakistan's independence and Pakistan's self-respect," former prime minister Nawaz Sharif told reporters in Lahore. "Pakistan is in a grave crisis and is surrounded by big danger."
Domestic critics say the U.S. raid also raises questions about the safety of Pakistan's cherished nuclear weapons but Gilani said any move against them would be met with "a matching response".
"Pakistan reserves the right to retaliate with full force," he said.
TENSE RELATIONS WITH WASHINGTON
Pakistani-U.S. relations were already fragile after a string of diplomatic disputes over issues including a big attack by a U.S. drone aircraft in March and Raymond Davis, a CIA contractor who shot dead two Pakistanis in the city of Lahore in January.
Potentially stirring tension further, a Pakistani TV channel and a newspaper published what they said was the name of the undercover CIA station chief in Islamabad.
The U.S. embassy declined to comment, but said no one of that name worked at the mission in Pakistan.
Last year, after the chief of Pakistan's Inter-Services Intelligence (ISI) agency was named in a U.S. civil case over attacks on the Indian city of Mumbai, the then-head of the CIA's Islamabad station was named by Pakistani media and forced to leave the country.
The government and military have been embarrassed by the discovery of bin Laden in Abbottabad, near the country's main military academy.
"If he was really living in that compound for five years ... then why didn't our agencies discover him?" former foreign minister Khursheed Mehmood Kasuri told reporters. "This has given anti-Pakistani elements a chance to ridicule us."
But Gilani said he had full confidence in the armed forces and the military's ISI which he called a "national asset". The military would brief parliament in a closed session on Friday.
OBAMA SUSPECTS SUPPORT NETWORK
U.S. President Barack Obama said on Sunday that bin Laden likely had "some sort" of a support network inside Pakistan, but added it would take investigations by Pakistan and the United States to find out just what the nature of that support was.
"We think that there had to be some sort of support network for bin Laden inside of Pakistan. But we don't know who or what that support network was," Obama said.
"We don't know whether there might have been some people inside of government, people outside of government, and that's something that we have to investigate, and more importantly, the Pakistani government has to investigate," he added.
Suspicion has deepened that the pervasive ISI, which has a long history of contacts with militant groups, may have had ties with the al Qaeda leader -- or that some of its agents did.
Some Pakistani analysts suspect powerful figures knew where bin Laden was hiding.
"Somebody in a position of authority had to know," said security analyst Ayesha Siddiqa, author of "Military Inc", which analyses the army's tight security, political and economic hold over Pakistan.
Siddiqa said the army and ISI's entrenched strategy of using violent militant groups as a counterweight against India may have been why the security establishment turned a blind eye to bin Laden, possibly regarding his network of followers as an asset against Indian influence.
Talat Masood, a retired general and defence analyst, said that if there was official collusion to keep bin Laden secure it was most likely provided at a local level.
"I feel definitely there were influential people who were protecting him," he said.
Pakistani security officials have reacted with scepticism to a U.S. assertion that bin Laden was actively engaged in directing his far-flung network from his Abbottabad compound.
Washington has said that, based on a trove of information that would fill a small college library seized in the raid, the hide-out was an "active command and control centre" for al Qaeda where he was involved in plotting attacks on the United States.