Al-Qaeda militants were within 45 days of launching a lethal cyanide attack on New York's subway system in early 2003, US intelligence sources suggest.
Zawahiri's decision left US officials guessing
But the attack, masterminded by Saudi militants, was called off by Osama Bin Laden's deputy, Ayman al-Zawahiri.
The revelations are contained in a new book excerpted by Time magazine.
Unnamed US officials confirmed their knowledge of the plot to the New York Times. The city's underground was placed on high alert in February 2003.
In The One Percent Doctrine, Ron Suskind says CIA officials came to learn about the plot after members of the cell were arrested in Bahrain in February 2003.
The plan was allegedly found on one of the computers they had been using.
The device they planned to use would have released deadly hydrogen-cyanide gas using a remote trigger, the book says.
Top US officials calculated that the casualties would be almost on a par with the 11 September 2001 attacks.
The CIA built a model of the device and showed it to President George W Bush, who put the US government on high alert, the book says.
Mr Bush and his aides were left guessing at the reasons why Zawahiri allegedly cancelled the plan.
"We were aware of the plot and took the appropriate precautions," the New York Police Department's chief spokesman, Paul Browne, told the New York Times newspaper.
In his book, Suskind says a Pakistani agent close to the al-Qaeda leadership had pointed US officials to the leader of the Saudi militants, who was later killed in a stand-off with Saudi police.