The two-stage operation came as the defense minister was in Washington for talks. The U.S. military increased its regional alert status after the attack and is "fully prepared to support our Yemeni partners," a senior U.S. defense official said.
At least 167 people were wounded, nine seriously, in the bombing and fierce firefight, which underscored the ability of insurgents to take advantage of Yemen's instability and tenuous security - even at the headquarters of its military.
Among the dead at the Defense Ministry complex, which also houses a military hospital, were soldiers and civilians, including seven foreigners - two aid workers from Germany, two doctors from Vietnam, two nurses from the Philippines and a nurse from India, according to Yemen's Supreme Security Commission, which issued the casualty figures. Among the Yemeni civilians killed were a doctor and a senior judge, it said.
The media arm of al Qaeda in the Arabian Peninsula (AQAP), al-Mallahem, claimed the attack early Friday morning on its Twitter account, saying it targeted the Defense Ministry building because it "accommodates drone control rooms and American experts." It said security headquarters used by the Americans in their war are "legitimate targets."
It was the deadliest attack in Sanaa since May 2012.
The U.S. considers AQAP to be the most active al Qaeda branchy in the world. In recent months, Washington has sharply escalated drone attacks against the militants in the impoverished nation. U.S. forces also have been training and arming Yemeni special forces, and exchanging intelligence with the central government.
The terrorist network gained a major foothold in the south, taking over several towns in the chaos that followed the 2011 uprising that ousted longtime President Ali Abdullah Saleh. The drone strikes and a series of U.S.-backed military offensives helped uproot several key militant strongholds, but al Qaeda continues to fight back.
AQAP has been behind a series of terror plots directed squarely at U.S. interests, including the Christmas 2010 attempted to blow up a plane arriving in Detroit, and a plan about a month earlier to put bombs hidden in printer parts on cargo planes flying into the U.S. and Europe.
In July, AQAP acknowledged that a U.S. strike in the country months earlier had killed Saeed al-Shihri, the group's Saudi deputy leader who had previously spent six years in the U.S. prison camp at Guantanamo Bay, Cuba.
Al Qaeda's Yemen branch is linked to the foiled plot on Christmas 2009 in which a passenger on a Detroit-bound plane allegedly tried to detonate explosives in his underwear, as well as explosives-laden parcels intercepted on cargo flights a year later.
Defense Minister Mohammed Nasser Ahmed was in Washington for consultations with U.S. officials, part of a "strategic dialogue" to aid Yemen's political transition and security cooperation.
Thursday's attacks "will not deter the security forces, the armed forces and the honorable sons of the nation from carrying out their religious and patriotic duty in the face of terrorists wherever they may be," said the statement by the Supreme Security Commission. It is led by President Abed Rabbo Mansour Hadi, who succeeded Saleh, and includes the country's top military and intelligence officials.
The senior U.S. defense official said the U.S. military "has increased its regional alert status following the terrorist attack on the Yemeni Republic Ministry of Defense."
"The United States military is fully prepared to support our Yemeni partners in the wake of this incident," added the official, who was not authorized to speak publicly about the matter and requested anonymity.
The U.S. State Department condemned the attack.
"We stand with Yemen against this violence and remain firmly committed to supporting the Yemeni people," said a statement from the State Department's deputy spokeswoman, Marie Harf.
Sam Wilkin, a Dubai-based Middle East analyst for the Control Risks consulting firm, said the attack displayed the ability of the militants to move explosives and armed fighters to a part of the capital that should be heavily protected.
"It suggests al Qaeda’s current strategy is to degrade the capabilities of the security forces and demoralize them to the extent they're no longer able to control certain areas of the country," he said.
At that point, “al Qaeda will probably try to fill that vacuum and effectively take control of certain areas," Wilkin added.
Although al Qaeda militants are concentrated in the southern and eastern parts of Yemen, they occasionally strike in the capital. In May 2012, a suicide bombing near the presidential palace in Sanaa killed 93 army conscripts.
Yemen is strategically located at the southwest corner of the Arabian Peninsula, bordering Oman and Saudi Arabia, two of Washington's closest Arab allies. Yemen has a shoreline on the Red Sea and the Arabian Sea near vital shipping lanes for oil tankers from the energy-rich Gulf region to the West.
Military officials said the attack began about 9 a.m. with the suicide bombing, which blew out windows and the doors of nearby homes and offices, destroyed an armored vehicle and reduced three cars to charred hulks.
The assault may have been timed to target a planned meeting of top commanders - a session that was unexpectedly delayed until later in the morning. The officials also said investigators suspected that sympathizers in the army may have helped the militants.
Two army vehicles went missing from the complex last month, but it was unknown if they were used in the attack, the officials said.
The Defense Ministry got a tip last week that a major attack was imminent in Sanaa, prompting authorities to reinforce security, according to the officials, who spoke on condition of anonymity because they were not authorized to talk to reporters.
Military helicopters hovered over the site as soldiers and ambulances arrived and gunfire echoed in the streets.
Hadi met with military commanders inside the devastated complex hours later and ordered an investigation, the officials said.
Security forces raided several homes in the ministry's vicinity following the attack, the officials said, but there was no word on any arrests or whether any weapons were found.
The commission did not state whether the casualty figures included the attackers, saying only that all were killed by troops. State TV showed a dozen bodies it said were the militants.
In Berlin, Foreign Minister Guido Westerwelle confirmed that two Germans and a Yemeni who worked for the aid organization GIZ were killed in what he called a "cowardly attack."
"These terrible crimes cannot be
justified," he said, urging the authorities to find those responsible for
the attack. "Yemen must not become a place of terrorism," he said.
U.N. Secretary-General Ban Ki-moon also condemned the attack and believes "the only path to a stable, prosperous and democratic Yemen is through the ongoing peaceful and all-inclusive National Dialogue Conference," U.N. spokesman Martin Nesirky said.