A Yemeni soldier checks vehicles near Sanaa International Airport on August 6. The US ordered Americans to leave Yemen "immediately" amid a worldwide alert linked to electronic intercepts from Al-Qaeda leader Ayman al-Zawahiri. (MOHAMMED HUWAIS/AFP/Getty Images)

Yemeni authorities said Wednesday that they had thwarted plans by al-Qaeda to attack a strategic southern port and oil and gas facilities, as U.S. intelligence officials expressed skepticism that the operation had disrupted a feared plot against Western targets.

A spokesman for the Yemeni government said members of the country’s al-Qaeda affiliate had planned to seize control of Mukalla, a vital seaport and capital of Hadramaut province, and the ­Canadian-run Mina al-Dhaba oil terminal west of Mukalla on the Arabian Sea. The militants allegedly planned to kill or kidnap foreigners working at the sites.

At the same time, separate groups of militants were to target the Belhaf gas pipeline in Yemen’s southern Shabwa province, as well as other gas facilities there, said the government spokesman, Rajeh Badi. The militants had planned to gain entry by disguising themselves in Coast Guard uniforms and staging a phony strike demanding unpaid bonuses for the Muslim holy month of Ramadan.

“We found out through our military sources about these plots, and so we took the necessary actions to make them fail,” Badi said. “This is the first time they have tried to take over the city of Mukalla.”

He would not elaborate on what measures were taken to thwart the plot, or by whom.

An al-Qaeda terrorist threat emanating from Yemen prompted the Obama administration last week to issue a worldwide travel alert and to close about two dozen embassies and consulates, including the one in Yemen’s capital, Sanaa. The State Department evacuated non-emergency personnel from the embassy aboard U.S. military aircraft.

On Wednesday, U.S. officials cast doubt on Yemeni claims that the danger had passed, saying that the apparent pipeline plot may have been only a component of a broader plan to hit Western targets. One U.S. official, speaking on the condition of anonymity because of the sensitivity of the subject, said that the statements from Yemeni officials should be viewed with skepticism and that American counterterrorism agencies remained on alert for potential attacks.

The State Department said the U.S. Embassy in Yemen would remain closed as officials evaluated the security situation.

The United States and Yemen are counterterrorism allies. Yemeni President Abed Rabbo Mansour Hadi paid a visit to the White House last week to discuss joint efforts against extremists, as well as other bilateral issues, including the possible return of Yemeni detainees held at the military prison at Guantanamo Bay, Cuba.

Still, the latest terrorism threat has exposed frictions in the relationship. After U.S. personnel were flown out of Sanaa on Monday night, Yemen’s embassy in Washington issued a statement saying the evacuation “serves the interests of the extremists and undermines the exceptional cooperation between Yemen and the international alliance against terrorism.”

“Yemen has taken all necessary precautions to ensure the safety and security of foreign missions in the capital,” the embassy said.

On Wednesday, Yemeni government officials said the ultimate goal of the disrupted plot was to take over Mukalla, controlling it and, by extension, the province. If successful, the plot would have been similar to when al-Qaeda in the Arabian Peninsula seized control of large parts of Abyan province in 2011.

Raghavan reported from Nairobi. Greg Miller and Anne Gearan in Washington contributed to this report.