The mastermind of the Sept. 11 attacks was linked to perpetrators of the London subway bombings and a plot to strike Heathrow Airport that never materialized, Pakistan's president says in his memoir.

Gen. Pervez Musharraf's "In The Line of Fire," released Monday, says Pakistan earned millions from some of the 689 arrests of Al Qaeda suspects in Pakistan, including the killers of Wall Street Journal reporter Daniel Pearl. He says 369 suspects have been handed to the United States.

Among those in U.S. custody is ex-Al Qaeda No. 3 Khalid Sheikh Mohammed, the alleged Sept. 11 mastermind captured in Pakistan in March 2003.

Musharraf wrote that Mohammed was linked to the July 7, 2005, London subway bombings, and plans to attack Heathrow airport with hijacked passenger planes. The allegation is the first publicly linking Mohammed to the subway attacks, which killed 52 people and four bombers.

CountryWatch: Pakistan

Musharraf said 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 — a financial district of London — and the city's 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, Musharraf wrote. The attacks on Heathrow and Canary Wharf did not take place.

"We had learned from KSM (Mohammed) that Al Qaeda's planners were thinking seriously about bombing Heathrow Airport ... as well as London's subway system," Musharraf wrote.

The suspect, identified by Musharraf only as a computer engineering graduate born in Karachi, is believed to be Mohammed Naeem Noor Khan, an Al Qaeda computer expert who was arrested by Pakistani authorities. His whereabouts remain unknown.

Musharraf is scheduled to meet Wednesday with President 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.

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, Musharraf wrote in his book.

"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," he wrote.

It was within this vacuum that Usama bin Laden and his Al Qaeda terror network strengthened, thanks to the support of the Taliban's leader, Mullah Omar, he added.

Click here to go to FOXNews.com's Asia Center.

Pakistan saw the Taliban as a means to end years of chaos in Afghanistan, which peaked during the 1992-96 civil war, wrote Musharraf, who came to power in a 1999 coup.

But after the Sept. 11 attacks, Musharraf wrote, he realized continuing to support the Taliban and have ties with militant groups would set Pakistan on a collision course with Washington.

Musharraf wrote that he weighed Pakistan's options, including the possibility of militarily countering any U.S. actions.

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.

Musharraf wrote that he thus cut Pakistan's support for the Taliban, despite a possible backlash from radical Islamic groups in his country.

Musharraf conceded that Al Qaeda 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.