WASHINGTON — The United States issued an extraordinary global travel warning to Americans on Friday about the threat of an al-Qaeda attack and closed down 21 embassies and consulates across the Muslim world for the weekend.

The alert was the first of its kind since an announcement preceding the 10th anniversary of the 9/11 terrorist attacks. This one comes with the scars still fresh from last year’s deadly Sept. 11 attack on a U.S. diplomatic post in Benghazi, Libya, that killed four Americans, including the U.S. ambassador, and with the Obama administration and Congress determined to prevent a similar breach of an American embassy or consulate.

“There is a significant threat stream, and we’re reacting to it,” said Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff.

He told ABC News in an interview to be aired Sunday that the threat was “more specific” than previous ones and the “intent is to attack Western, not just U.S. interests.”

The State Department said the potential for terrorism was particularly acute in the Middle East and North Africa, with a possible attack occurring on or coming from the Arabian Peninsula.

U.S. officials pointed specifically to Yemen, the home of al-Qaeda’s most dangerous offshoot and the network blamed for several notable terrorist plots on the United States, from the foiled Christmas Day 2009 effort to bomb an airliner over Detroit to the explosives-laden parcels intercepted the following year aboard cargo flights.

“They may focus efforts to conduct attacks in the period between now and the end of August,” the State Department’s travel alert said.

One date in particular — this Sunday — was mentioned in the State Department warning. All embassies that would have been open that day were ordered to close Sunday and perhaps longer. The edict affects embassies in Muslim countries, where Sunday is a workday, and coincides with a special night in the Islamic holy month of Ramadan.

“The blinking red intelligence appears to be pointing toward an Al-Qaeda in the Arabian Peninsula plot,” said Seth Jones, counterterror expert at the Rand Corp.

Britain also took action Friday in Yemen, announcing it would close its embassy there on Sunday and Monday as a precaution. British embassies and consulates elsewhere in the Middle East were to remain open.

Rep. Ed Royce, R-Calif., chairman of the House Foreign Affairs Committee, said Friday the embassy threat was linked to al-Qaeda and focused on the Middle East and Central Asia.

“We’ve had a series of threats,” Royce told reporters. “In this instance, we can take a step to better protect our personnel, and, out of an abundance of caution, we should.” He declined to say if the National Security Agency’s much-debated surveillance program helped reveal the threat.

The New York Times reported Friday night that American officials said the U.S. had intercepted electronic communications among senior operatives of al-Qaeda.

Friday’s alert warned that al-Qaeda or its allies might target U.S. government or private American interests. It cited dangers involved with public transportation systems and other prime sites for tourists, noting that previous terrorist attacks have centered on subway and rail networks as well as airplanes and boats.

“U.S. citizens should take every precaution to be aware of their surroundings and to adopt appropriate safety measures to protect themselves when traveling,” the State Department said. It recommended that Americans traveling overseas register with consular authorities on a travel registration website.

August is a popular month for U.S. flights making international trips. From 2003 through 2012, August had the second- most international passenger flights on U.S. carriers, after July. There were 781,420 flights — 9.1 percent of all international flights during the decade, according to the Bureau of Transportation statistics.

More in News

A White House advisory council on infrastructure Thursday became the latest casualty of the pique of business leaders over President Donald Trump’s response to the hate-fueled violence in Charlottesville, Virginia.

The first solar eclipse to cross the continental United States in nearly a century comes at an especially inopportune time for many employers. From 10:15 a.m. Pacific until just before 3 p.m. Eastern time — some of the busiest hours of the workweek — the moon’s shadow will hit land in Newport, Ore. and leave the continent near Charleston, S.C.