At the same time, the officials said a drone strike in the Yemen's southeast killed seven people on Wednesday. An earlier strike on Tuesday had killed four people.
Disclosure of the foiled plot provided the first indication as to why Western nations were increasingly concerned for the safety of their citizens.
Intercepts of secret correspondence between Ayman al-Zawahri, the leader of al-Qaeda, and Nasir ul-Wuhayshi, the leader of the Qaeda affiliate in Yemen, inspired deep concern inside the United States government about a possible terrorist plot by the group.
Those fears prompted a mass closing of American and other Western diplomatic outposts. American government officials said Zawahri used the communication to urge the Yemeni militant leader to carry out a large terrorist attack.
Yemeni security officials said part of the militant operation included a plan to take control of the Canadian-run Mina al-Dhaba oil terminal in the Mukallah region on the Arabian Sea. The officials did not say how it was disrupted.
The plan would have involved Qaeda operatives wearing Yemeni Army uniforms to seize the port and then attack, kill or kidnap foreigners working there, the officials said.
The BBC earlier quoted a Yemeni government spokesman as saying the foiled plots were more extensive, involving plans to blow up oil pipelines and take over two ports in the south, threatening Yemen's oil exports.
NASSER ARRABYEE & ALAN COWELL