WASHINGTON, Nov 18: President Jimmy Carter's national security adviser Zbigniew Brzezinski was the first senior US official who argued that US security needs required Washington to accept Islamabad's nuclear programme.

A new book on the CIA's role in Afghanistan and Pakistan, "This Ghost Wars: The Secret History of the CIA, Afghanistan and bin Laden", reveals how security needs often forced the US administration to bend its professed foreign policy goals such as non-proliferation.

The softening of the US policy towards Pakistan's nuclear programme followed the Soviet invasion and occupation of Afghanistan in 1979, the book says.

Soon after the invasion, Mr Brzezinski wrote to President Carter: "This will require a review of our policy towards Pakistan, more guarantees to it, more arms aid, and, alas, a decision that our security policy toward Pakistan cannot be dictated by our non-proliferation policy."

The book also reveals how the Clinton and Bush administrations missed several chances to target Al Qaeda leader Osama bin Laden.

During the winter of 1998-99, the CIA learned that a large party of Persian Gulf dignitaries had flown into the Afghan desert for a falcon-hunting party. The report from CIA field agents said bin Laden had also joined the party.

The agency called for an attack on their encampment until Richard Clarke, President Clinton's counter-terrorism aide, discovered that among the hosts of the gathering was royalty from the United Arab Emirates.

Mr Clarke had been instrumental in a 1998 deal to sell 80 F-16 military jets to the UAE, which was also a crucial supplier of oil and gas to America and its allies. The strike was called off.

The author of the book, Steve Coll, was the Washington Post's South Asia bureau chief from 1989 to 1992 and was based in New Delhi. Among the notable figures he interviewed for the book is former Prime Minister Benazir Bhutto, who acknowledges that she knew Pakistan was helping the Taliban, but she did not share this information with the US administration while in power.

Besides three former CIA directors, Mr Coll also interviewed several senior CIA officials who had headed the agency's Islamabad station during the Afghan war: Howard Hart, station chief in 1981, William Piekney, from 1984 to 1986 and Milton Bearden, 1986 -1989.

The book claims that the Jamaat-i-Islami has strong links to the Muslim brotherhood, which later produced senior Al Qaeda leaders like bin Laden and his deputy Ayman al-Zawahiri. The Jamaat, says the author, was strongly backed by the Pakistan Army.

Mr Coll writes that William Casey, the CIA's director from January 1981 to January 1987, more than any other American, was responsible for welding the alliance of the CIA, Saudi intelligence, and the Pakistan Army during the Afghan war.

On the suggestion of Pakistan's Inter-Services Intelligence, Mr Casey printed thousands of copies of the Quran, which he shipped to the Afghan frontier for distribution in Afghanistan and Soviet Uzbekistan. He also fomented, without presidential authority, Muslim attacks inside the USSR and always held that the CIA's clandestine officers were too timid.

In the post-Casey era, some US scholars, journalists, and members of Congress questioned the CIA's lavish support of the Pakistan-backed Islamist general Gulbadin Hekmatyar, especially after he refused to shake hands with President Ronald Reagan because he was an infidel. But Milton Bearden, CIA's Islamabad station chief from 1986 to 1989, and Frank Anderson, chief of the Afghan task force at the CIA headquarters, vehemently defended Mr Hekmatyar on the grounds that "he fielded the most effective anti-Soviet fighters."

Even after the Soviet Union withdrew from Afghanistan in 1988, the CIA continued to follow Pakistani initiatives, such as aiding Mr Hekmatyar's successor, Mullah Omar, leader of the Taliban.

Mr Coll says that Edmund McWilliams, the State Department's special envoy to the Afghan resistance in 1988-89, wrote that "American authority and billions of dollars in taxpayer funding had been hijacked at the war's end by a ruthless anti-American Islamists and Pakistani intelligence officers determined to impose their will on Afghanistan." CIA officials, however, denounced him and planted stories in the US Embassy in Islamabad that he might be homosexual or an alcoholic.

Mr Coll says Gen Zia was a devout Muslim and a passionate supporter of Islamist groups in his own country, in Afghanistan, and throughout the world. But he was not a fanatic and would not have been included in the US Embassy's annual "beard census", which maintained a record of Pakistani military officers who kept their beards for religious reasons.

Pakistani rulers, from Gen Zia to Gen Pervez Musharraf and the two civilians who ruled the country in the interim period, all supported the Taliban in pursuit of Gen Zia's 'dream' - a loyal, Pukhtun-led Islamist government in Kabul, says Mr Coll. He also explains it.