An intercepted secret message between al Qaida chief Ayman al-Zawahri and his deputy in Yemen about plans for a major terror attack was the trigger for the current shutdown of many US embassies.

A US intelligence official and a Mideast diplomat said al-Zawahri's message was picked up several weeks ago and appeared to initially target Yemeni interests.

The threat was expanded to include American or other Western sites abroad, officials said, indicating the target could be a single embassy, a number of posts or some other site. Politicians have said it was a massive plot in the final stages, but they have offered no specifics.

The intelligence official said the message was sent to Nasser al-Wahishi, the head of the terror network's organisation, based in Yemen, known as al Qaida in the Arabian Peninsula.

American spies and intelligence analysts yesterday scoured email, phone calls and radio communications between al Qaida operatives in Yemen and the organisation's senior leaders to determine the timing and targets of the planned attack.

The call from al-Zawahri, who took over from Osama bin Laden after US Navy SEALs killed him in May 2011, led the Obama administration to close diplomatic posts from Mauritania on Africa's west coast to Bangladesh, and as far south as Madagascar.

The US did reopen some posts yesterday, including well-defended embassies in Kabul, Afghanistan, and Baghdad.

Authorities in Yemen, meanwhile, released the names of 25 wanted al Qaida suspects and said they had been planning terrorist attacks targeting "foreign offices and organisations and Yemeni installations" in the capital Sanaa and other cities across the country.

The Yemeni government also went on high alert yesterday, stepping up security at government facilities and checkpoints.

Officials in the US would not say who intercepted the initial suspect communications - the CIA, the National Security Agency, the Defence Intelligence Agency or one of the other intelligence agencies - that kicked off the closure of US facilities.

But an intelligence official said the controversial NSA programmes that gather data on American phone calls or track internet communications with suspected terrorists played no part in detecting the initial tip.

The surveillance is part of the continuing effort to track the spread of al Qaida from its birthplace in Afghanistan and Pakistan to countries where governments and security forces are weaker and less welcoming to the US, including Syria, Iraq, Somalia, Mali and Libya, as well as Yemen.

Al Qaida in the Arabian Peninsula has been blamed for the foiled Christmas Day 2009 effort to bomb an airliner over Detroit and the explosives-laden parcels intercepted the following year aboard cargo flights.

The Us government announced the embassy closures one day after President Barack Obama met Yemeni President Abdo Rabby Mansour Hadi.

Acting on what it said was an "overabundance of caution," the State Department on Sunday closed a total of 19 diplomatic posts until next Saturday.

They include posts in Bangladesh and across North Africa and the Middle East as well as East Africa, including Madagascar, Burundi, Rwanda and Mauritius. The closure of the African facilities came just days before the 15th anniversary of al Qaida's bombings of American diplomatic missions in Kenya and Tanzania.

The British and German embassies in Yemen were also closed. Norway's Foreign Ministry restricted public access to 15 of its embassies in the Middle East and Africa, including its post in Saudi Arabia.