Correction: An earlier version of this article incorrectly described all 21 outposts that the U.S. planned to close as embassies. Seventeen embassies were closed along with the consulates in Irbil, Iraq; Dubai, United Arab Emirates; and Jeddah and Dhahran, Saudi Arabia.

A suspected al-Qaeda threat prompted the United States to issue a rare worldwide travel alert Friday, just a day after it announced that it would shutter 21 U.S. embassies and consulates across the Muslim world this weekend.

U.S. officials said the threat was tied to al-Qaeda’s Yemeni affiliate, which previously has been linked to plots to blow up a U.S.-bound airliner and cargo flights.

Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, told ABC News that the alert and diplomatic outpost closings were the result of “a significant threat stream” that is “more specific, and we are taking it seriously.”

Dempsey, who was interviewed for “This Week,” said an exact target was not known, “but the intent seems clear. The intent is to attack Western, not just U.S., interests.”

The State Department’s alert warned that “terrorists may elect to use a variety of means and weapons and target both official and private interests,” notably public transportation systems including “subway and rail systems, as well as aviation and maritime services.” The alert did not warn against travel to any specific country but cautioned travelers about the continued “potential for terrorist attacks, particularly in the Middle East and North Africa.”

“Current information suggests that al-Qa’ida and affiliated organizations continue to plan terrorist attacks both in the region and beyond, and that they may focus efforts to conduct attacks in the period between now and the end of August,” the State Department said in the alert.

The last time the United States issued a worldwide alert was October 2011, although it has issued other, less-urgent worldwide travel guidance more recently.

Terrorism experts said the plot may be a response to the killing of Said Ali al-Shihri, the deputy leader of al-Qaeda’s affiliate in Yemen, whose death was confirmed by the group last month.

“We got intelligence, and not just the normal chitchat, that there could be an attack on Americans or our allies,” Rep. C.A. Dutch Ruppersberger (Md.), the top Democrat on the House intelligence committee, told reporters Friday.

He added that publicizing the warnings “gives notice to the people that are planning it: We know something’s out there.”

Al-Qaeda’s affiliate in Yemen, also known as al-Qaeda in the Arabian Peninsula (AQAP), has seen its ranks degraded over the past few years by a U.S. drone campaign targeting the organization’s leadership. A September 2011 strike killed Anwar al-
, the American cleric who had inspired a handful of terrorist plots in the West.

Still, experts note that AQAP remains highly capable and that al-Qaeda groups in other regions are strengthening.

“Al-Qaeda affiliates across North Africa and the Middle East are much stronger than they were a year ago,” said Bruce Hoffman, a terrorism expert at Georgetown University. Hoffman cited two recent prison breaks carried out by al-Qaeda affiliates in Libya and Iraq as evidence that “they have access to heavy weaponry [and] can stage much more consequential attacks.”

Hoffman suggested that U.S. officials may have been particularly quick to issue warnings in light of the deadly terrorist attack on the U.S. compound in Benghazi, Libya, last September. The attack killed four Americans, including U.S. Ambassador J. Christopher Stevens.

U.S. embassies and consulates in 21 countries in the Middle East, South Asia and North Africa will be closed for the weekend in response to the threat. Sunday is a normal working day in most Muslim countries, and embassies in them would typically be open for business.

A spokesman for Britain’s Foreign Office said Friday that the United Kingdom also would close its embassy in Yemen on Sunday and Monday, citing a “high threat from terrorism.”

State Department spokeswoman Marie Harf stressed Thursday that officials were acting “out of an abundance of caution and care for our employees and others who may be visiting our installations.” She did not provide details of the security threat but said diplomatic outposts could remain closed into next week.

Seth Jones, associate director of the International Security and Defense Policy Center at Rand Corp., said the alert probably had been prompted by “pretty reliable information.” While the threat apparently emanates from AQAP, Jones noted that the threats posed by other terrorist groups persuaded officials to issue a broad alert.

The probability of American travelers being affected nonetheless seems remote, said Jones.

“If you’re in Yemen [or] if you’re for some reason vacationing in Kabul, you might want to be careful,” Jones said. “But other than that, I’m not sure there is much anybody can do.”

Greg Miller and Julie Tate contributed to this report.