WASHINGTON — The Obama administration’s decision last week to close nearly two dozen diplomatic missions and issue a worldwide travel alert came after the United States intercepted electronic communications in which the head of Al Qaeda ordered the leader of the group’s affiliate in Yemen to carry out an attack as early as this past Sunday, according to American officials.

The intercepted conversations last week between Ayman al-Zawahri, who succeeded Osama bin Laden as the head of the global terrorist group, and Nasser al-Wuhayshi, the head of the Yemen-based Al Qaeda in the Arabian Peninsula, revealed what American intelligence officials and lawmakers have described as one of the most serious plots against American and Western interests since the attacks on Sept. 11, 2001.

American officials said that it was highly unusual for senior Qaeda leaders in Pakistan to discuss operational matters with the group’s affiliates. The communication between the two men seems to indicate that Mr. Zawahri — whom administration officials have portrayed as greatly diminished and hindered in running a global terror network while deep in hiding — still has a strong influence over a group in Yemen that has become Al Qaeda’s most powerful offshoot.

In recent weeks, counterterrorism officials said, Mr. Zawahri has elevated Mr. Wuhayshi to what one official described as the new “general manager” of the global terror network, making him the second most important man in the organization.