Gen. Pervez Musharraf, in his book "In The Line of Fire," also said he had no choice after the Sept. 11, 2001, attacks but to switch from supporting the Taliban to backing the U.S.-led war on terror groups or face an American "onslaught."
Musharraf, 63, also criticizes the U.S.-led invasion of Iraq, saying it has exacerbated "extremism" and made the world "more dangerous."
Musharraf, who is on a tour of the U.S., is scheduled to meet Wednesday with President George W. Bush and Afghan President Hamid Karzai to seek ways to bridge their disagreements on the fight against Islamic militants, particularly along the Afghan-Pakistani frontier.
Unusual in publishing a memoir while still in power, Musharraf's book, released Monday, details some of almost 700 arrests of al-Qaida suspects in Pakistan, including the killers of U.S. journalist Daniel Pearl.
"We have captured 689 and handed over 369 to the United States. We have earned bounties totaling millions of dollars," he says without saying how much was provided.
Among those in U.S. custody is ex-al-Qaida No. 3 Khalid Sheikh Mohammed, the Sept. 11 attacks mastermind captured in Pakistan in March 2003.
Musharraf wrote Mohammed was behind the July 7, 2005, London subway bombings and plans to attack Heathrow airport with hijacked passenger planes. It marked the first time anyone had linked Mohammed to the subway attacks that killed 52 people and four bombers.
Musharraf says a suspect detained in Lahore in 2004 by Pakistani authorities had been ordered by Mohammed to carry out reconnaissance for possible attacks on Heathrow Airport, Canary Wharf and the subway system.
Information on the unidentified suspect's laptop would later help provide a link between Mohammed and two of the four London transport system bombers. Attacks on Heathrow and Canary Wharf never eventuated.
"We had learned from KSM (Mohammed) that al-Qaida's planners were thinking seriously about bombing Heathrow Airport ... as well as London's subway system," Musharraf writes.
The suspect, identified by Musharraf only as a computer engineering graduate born in Karachi, is believed to be Mohammed Naeem Noor Khan, an al-Qaida computer expert who was arrested by Pakistani authorities but his whereabouts remain unknown.
Musharraf says Pakistan, the United States and Saudi Arabia created an extremist "monster" by supporting Islamic groups fighting the Soviet Union's 1979-89 occupation of Afghanistan.
"We had assisted in the rise of the Taliban after the Soviet Union withdrew from Afghanistan, which was then callously abandoned by the United States," Musharraf says.
It was within this vacuum that Osama bin Laden and his al-Qaida terror network strengthened, thanks to the support of the Taliban's leader, Mullah Omar, he adds.
Pakistan saw the Taliban as a means to end years of chaos in Afghanistan, which peaked during the 1992-96 civil war, says Musharraf, who came to power in a 1999 coup.
But after the Sept. 11 attacks, Musharraf says, he realized continuing to support the Taliban and have ties with militant groups would set Pakistan on a collision course with Washington.
"America was sure to react violently, like a wounded bear," Musharraf writes. "If the perpetrator turned out to be al-Qaida, then that wounded bear would come charging straight toward us."
Musharraf says he weighed Pakistan's options, including the possibility of militarily countering any U.S. actions.
"I war-gamed the United States as an adversary," he writes, but concluded Pakistan's military, economic and social weaknesses made it impossible to confront America.
He also worried about nuclear-armed India, with which Pakistan has fought three wars since their 1947 independence from Britain, including two over the disputed Himalayan region of now divided Kashmir.
"The Indians might have been tempted to undertake a limited offensive there (Kashmir); or more likely they would work with the United States and the United Nations to turn the present situation into a permanent status quo," Musharraf writes. "The United States would certainly have obliged."
He adds: "It is no secret that the United States has never been comfortable with a Muslim country acquiring nuclear weapons and the Americans undoubtedly would have taken the opportunity of an invasion to destroy such weapons."
Musharraf says he thus cut Pakistan's support for the Taliban, despite a possible backlash from radical Islamic groups in his country.
"Self-interest and self-preservation were the basis of this decision," he says.
Musharraf concedes al-Qaida and Taliban militants still operate in his country, while repeating his insistence that he has no knowledge of the whereabouts of top fugitives, including bin Laden and Omar, AP writer Paul Garwood wrote.
"It is only a matter of time before bin Laden is caught," he writes. "If I had to guess, I would assume that he is moving back and forth across the Pakistan-Afghanistan border somewhere."
There are several versions of the recent assassination of the most prominent Iranian nuclear scientist and high-ranking officer of the Islamic Revolutionary Guard Corps, Mohsen Fakhrizadeh