Pakistan failed to detect Osama bin Laden during the six years he hid in Abbottabad because of the "collective incompetence and negligence" of the country's intelligence and security forces, the official report into the killing of the al-Qaida chief in 2011 has concluded.

The much anticipated report, a copy of which was obtained by al-Jazeera, is withering in its criticism of Pakistan's dysfunctional institutions, which were unable to find the world's most wanted man during his long stay in a major Pakistani city.

"It is a glaring testimony to the collective incompetence and negligence, at the very least, of the security and intelligence community in the Abbottabad area," said the report, which criticised Pakistan's military spy agency, the Inter-Services Intelligence directorate (ISI), for having prematurely "closed the book" on Bin Laden in 2005.

Nor does the 336-page document rule out the possibility of involvement by rogue Pakistani intelligence officers, who have been accused of deliberately shielding Bin Laden by some commentators.

"Given the length of stay and the changes of residence of [Bin Laden] and his family in Pakistan … the possibility of some such direct or indirect and "plausibly deniable" support cannot be ruled out, at least, at some level outside formal structures of the intelligence establishment."

It warns that the influence of radical Islamists inside the armed forces had been "underestimated by senior military officials whom the commission met".

The document also gives a fascinating glimpse into the day-to-day life of Bin Laden: according to an account given to the Abbottabad Commission by his wives, he wore a wide-brimmed cowboy hat to avoid detection from spy satellites above, liked to have an apple and a bit of chocolate to perk himself up when he was feeling weak, and encouraged his grandchildren to compete over who could tend the best vegetable patch.

The children of one of Bin Laden's trusted Pakistani couriers knew him as "Miskeen Kaka", or "poor uncle" – after one asked why the tall Arab never went out on shopping expeditions, the child was told he was too poor to buy anything.

The document also reveals the tantalising moment when the car bin Laden was riding in was stopped by police in the picturesque region of Swat. The policeman was not quick-witted enough to spot the then clean shaven bin Laden and the group were allowed to pass.

In addition to its scorching criticism of Pakistani institutions, the document reflects official fury at the behaviour of the US. It concludes the US "acted like a criminal thug" when it sent the special forces raiding party into Pakistani territory.

It says that the incident was a "national tragedy" because of the "illegal manner in which [Bin Laden] was killed along with three Pakistani citizens".

It says the operation on 2 May 2011 was an "American act of war against Pakistan" which illustrated the US's "contemptuous disregard of Pakistan's sovereignty, independence and territorial integrity in the arrogant certainty of its unmatched military might".

Begun soon after the dramatic US raid, the judge-led inquiry by the Abbottabad commission heard testimony from some of the country's most important players, including the ISI chief, Ahmad Shuja Pasha, who shared much of the authors' despair about Pakistan, warning that it is a "failing state".

With frank discussion of some of the country's most sensitive issues, there were real fears it would never be published.

In remarks that will be seized on by critics of the CIA's use of drone strikes against suspected militants inside Pakistan, Pasha admitted to a "political understanding" on the issue between Islamabad and the US – something Pakistan has always officially denied.

Pasha said there were no written agreements, and that Pakistan did subsequently attempt to stop drone attacks, but added that "it was easier to say no to them at the beginning".

The former spy chief was scathing about the quality of Pakistan's civilian leadership, accusing his nominal boss, the defence minister, of failing to have read "the basic documents concerning defence policy". "There was simply no culture of reading among the political leadership," and "the thinking process was also non-existent".

The report also contains much criticism of the US, in particular the CIA for its failure to share intelligence fully with the ISI.

At one point, the CIA gave Pakistan phone numbers to monitor that would ultimately help identify Bin Laden's personal courier – the all-important lead that eventually brought the manhunt to the al-Qaida chief's Abbottabad home. The CIA never explained the significance of the phone numbers and the ISI failed to properly monitor them, the report said.

But in a striking echo of US unwillingness to share intelligence with its Pakistani partners, Pasha also said the ISI was reluctant to work with Pakistan's own law enforcement organisations because "there were too many instances where information shared with the police had been compromised".

His evidence highlights the ISI's distrust of and anger at the CIA, which Pasha claimed deliberately prevented Pakistan from claiming the glory for finding Bin Laden, which he said would have improved Pakistan's international reputation.

The "main agenda of the CIA was to have the ISI declared a terrorist organisation", he is quoted as saying.

Pasha reports the words of a US spy: "You are so cheap … we can buy you with a visa, with a visit to the US, even with a dinner … we can buy anyone."

The report asks whether the ISI had been compromised by CIA spies. One lieutenant colonel who "disappeared" with his family the day after the Abbottabad raid had a profile that "matched that of a likely CIA recruit".

The document repeatedly returns to what it describes as "government implosion syndrome" to explain the failure of any institution to investigate Bin Laden's unusual hideout.

"How the entire neighbourhood, local officials, police and security and intelligence officials all missed the size, the strange shape, the barbed wire, the lack of cars and visitors … over a period of nearly six years beggars belief," it says.

It notes that the house was even declared uninhabited in an official survey of the area, even though 26 people were living there at the time.

It says Bin Laden must have required a support network "that could not possibly have been confined to the two Pashtun brothers who worked as his couriers, security guards and general factotums".

The report says: "Over a period of time an effective intelligence agency should have been able to contact, infiltrate or co-opt them and to develop a whole caseload of information. Apparently, this was not the case."

It also expresses shock that the US helicopters carrying members of Navy Seal team six were not spotted as they swooped in over Abbottabad on 2 May. A lack of operational radar meant the Pakistani air force only became aware of the attack from media reports after it was over.