Pakistan’s army ordered an inquiry on Monday into a former spy chief for co-writing a book with the ex-chief of an intelligence agency from arch-rival India that has stirred controversy on a range of issues.

The U.S. raid that killed Osama bin Laden is the most thorny issue in “Spy Chronicles,” written by former chief of Pakistan’s Inter Services Intelligence (ISI) Asad Durrani and A.S. Dulat, an ex-chief of Indian intelligence Research and Analysis Wing (RAW).

“A formal Court of Inquiry headed by a serving Lt. Gen. has been ordered to probe the matter in detail,” the army said in a statement.

The army barred retired Lt. Gen. Durrani, who served as the ISI chief in the early 1990s, from leaving the country, saying he had violated the military code of conduct.

“The ISI probably learnt about OBL (Osama bin Laden) and he was handed over to the United States according to a mutually agreed process,” Durrani wrote.

This contradicts Pakistan’s official stance that it only knew of the U.S. raid on May 2, 2011, which targeted the compound where bin Laden was holed up, after the U.S. stealth helicopters had left its territory. The compound is in the northern city of Abbotabad, next to an army academy that produces officers.

“The denial of any (Pakistani) role was because cooperating with the United States to eliminate a person regarded by many in Pakistan as a “hero” could have embarrassed the government,” Durrani said in the book.

“(India’s) assessment is the same, that Osama bin Laden was handed over to the United States by Pakistan,” Durani’s co-author Dulat wrote.

Other sensitive topics broached in the book include the Pakistani spy agency’s interference in politics and Islamabad’s support for groups fighting Indian forces in disputed Kashmir.

Pakistan and India have fought three wars since they won independence from British rule in 1947. They now both have nuclear weapons.