"Sabotage ship in harbour; large fires, naphthalene [explosive chemical compound]," says a Pentagon memo. "Sink ship near harbour entrance. Conduct funeral for mock victims."

The idea was an element in a wider scheme that "may be the most corrupt plan ever created by the US government", asserts James Bamford, who wrote Body of Secrets about the NSA, the surveillance organisation said to be the largest of its kind in the world.

The Pentagon document was drawn up 11 months after the failure of the Bay of Pigs invasion in April 1961 by 1,500 anti-Castro expatriates trained by the CIA. More than 100 were killed; the rest surrendered.

The anonymous Pentagon official's idea of sinking the boat was part of a broader plan to swing American sentiment in favour of an attack on the island. The book says the memo was written on the orders of Brigadier-General William Craig, who was involved in Operation Mongoose, an attempt to remove Fidel Castro by sabotage and disruption.

The memo was submitted to the five-member joint chiefs of staff, whose chairman, General Lyman Lemnitzer, recommended it to the defence secretary, Robert McNamara.

"We could develop a communist Cuban terror campaign in the Miami area, in other Florida cities and even in Washington," said the chiefs of staff. "The terror campaign could be pointed at Cuban refugees seeking haven in the United States.

"We could blow up a US ship in Guantanamo Bay [the American military base in Cuba] and blame Cuba. Casualty lists in US newspapers would cause a helpful wave of national indignation."

Mr McNamara denies seeing such plans. "It makes no sense. There were contingency plans, yes, but there are contingency plans to invade the moon."

Other ideas included: accusing the Cubans of using electronic interference to sabotage the 1962 mission of astronaut John Glenn, if his launch into orbit were to fail; downing a remote-controlled unmanned plane over Cuba and blaming Havana's forces; and persuading anti-communist islanders to stage riots and attacks on the Guantanamo base.

Later the joint chiefs even suggested attacking Jamaica or Trinidad and Tobago and making it look as if the Cubans were responsible, hoping this might force Britain into a war on President Castro to protect Commonwealth members.