EVEN now, a week on, it is still not entirely clear what the trigger was. But something so alarmed Barack Obama and his intelligence advisers that on August 1st they decided to close 19 diplomatic missions in the Middle East and north Africa, and to issue a worldwide travel alert.

What has gradually emerged is that America’s National Security Agency (NSA) last week intercepted electronic communications, probably conversations on satellite phones, between Ayman al-Zawahiri, Osama bin Laden’s successor as head of al-Qaeda, and Nasser al-Wuhayshi, the leader of its Yemen-based affiliate, al-Qaeda in the Arabian Peninsula (AQAP), who is Mr Zawahiri’s de facto deputy.

In recent years, as al-Qaeda’s central leadership in North Waziristan has been relentlessly reduced by American drone strikes, AQAP has been by far the most active branch of the network in plotting attacks on targets in the West. Those who have been briefed on what passed between the two men say that Mr Zawahiri had ordered a series of attacks to coincide with the Muslim holiday of Laylat al-Qadr, which marks the 27th night of Ramadan and fell last weekend. If successful, they would have been among the most deadly since September 11th 2001.

Yemen itself and Western interests there were probably the main target, but not necessarily the only one. On August 6th America and Britain evacuated their diplomats from Yemen’s capital, Sana’a, and advised their other nationals to leave the country. In the past two weeks at least five American drone strikes have been launched to disrupt what the government in Sana’a has described as an ambitious al-Qaeda plot to blow up oil pipelines and seize some of the country’s ports. Around 25 terrorist suspects have been killed so far, according to local reports. It is not known whether senior figures were among them.

Drones operated by the CIA fly from a base in Saudi Arabia, while others, under the Joint Special Operations Command, take off from Djibouti. After a record 54 strikes last year, there had been a lull in activity after Mr Obama announced a tightening of the rules of engagement in May. American special forces, who already train Yemeni counter-terrorist units, are said to be preparing for more direct action against al-Qaeda.

None of this in itself explains why the White House made such a dramatic public statement of its anxieties, rather than acting quietly to thwart the plot when it heard of it. Disruptions to travel have an economic cost; and there are potentially important security drawbacks as well.

First, al-Qaeda has been given precious information about American surveillance capabilities that will help it keep its communications more secure in future. Second, the plotters may have a “plan B” that the intelligence agencies, as yet, have no knowledge of. Third, the alarms strongly contradict the administration’s previous claims that al-Qaeda has been weakened, by its efforts, to the brink of defeat.

One strong influence on administration thinking was the death of Ambassador Christopher Stevens and three others when the American consulate in Benghazi, in Libya, was violently besieged on September 11th 2012 by jihadist fighters possibly linked to al-Qaeda. Shortly before that assault, Mr Zawahiri had issued a video demanding attacks on Americans in Libya to mark the anniversary.

In the aftermath of the Benghazi tragedy, Republicans accused the administration of misrepresenting what had taken place in order to absolve itself from charges of tardiness and complacency. Even if the shriller claims were not borne out, a good deal of the mud stuck. This time, by contrast, normally hostile congressional Republicans were quick to praise the NSA (recently under pressure after Edward Snowden’s revelations about the extent of its data-gathering) and to back the administration’s response.

Separately, on August 6th, it was disclosed that American federal law-enforcement agencies had filed murder charges against Ahmed Abu Khattala, a well-known militia leader in Benghazi. Charges under seal have also been filed against up to a dozen others who are believed to have played some part in the deaths of Stevens and his colleagues. Given the difficulties of law enforcement in Libya, it is far from certain whether any of the accused will face justice.

But while the Obama administration may be congratulating itself on its handling of the current crisis, longer-term questions arise. The first is the strengthening of security at diplomatic missions in dangerous places, which in the past Congress has failed to stump up for. There is something shaming about shutting down America’s embassies across an entire region. The second is the need for a thorough reassessment of the threat that continues to be posed by al-Qaeda and its extensive network of affiliates.

Although that threat, at least as far as the West is concerned, has appeared to wane in recent years, the organisation has proved itself to be both resilient and adaptable. In Yemen, AQAP, in cahoots with local tribes, controls a fair amount of territory and is a communications and fund- raising hub for the rest of the organisation. In Syria, Jabhat al-Nusra, by far the most powerful of the rebel militias, has been absorbed by al-Qaeda in Iraq, which itself has re-energised the bloody Sunni insurgency against the Shia-dominated government of Nuri al-Maliki. Al-Qaeda is increasingly active in the open spaces of Sinai, and sees opportunity in the ousting of the Muslim Brotherhood government in Cairo. The departure of NATO combat forces from Afghanistan by the end of next year may allow it to return to some parts of the south and east of the country under Taliban protection, while the central leadership in Pakistan’s tribal badlands may also be anticipating a slackening in the drone campaign that has thinned its ranks.

In May Mr Obama spoke of the “war on terror” coming to an end. It is true that al-Qaeda’s focus is now mostly on local struggles rather than the “far” enemy in the West. But, compared with 12 years ago, it has many more fighters and holds much more territory. Its priorities could easily and at any moment shift once more. If a conversation between Mr Zawahiri and Mr Wuhayshi can be the cause of so much bother and trouble, Mr Obama may have to think again.