A suicide car bomb blew up at the gates of the complex in Sanaa’s Bab al-Yaman district, at the entrance to the old city, and a gunbattle followed at a hospital inside.
At least two foreign medical staff are among the dead, medical sources say.
Yemeni security forces are fighting regional rebels and al-Qaeda, while combating lawlessness and army splits.
Defense Minister Mohammed Nasser is currently on a visit to Washington.
No group has said it carried out Thursday’s attack.
Correspondents say it bears the hallmarks of al-Qaeda in the Arabian Peninsula (AQAP).
However, one government minister has blamed people linked to former President Ali Abdullah Saleh.
Officials said the situation was under control and most of the gunmen had been killed.
“The attack took place shortly after working hours started at the ministry when a suicide bomber drove a car into the gate,” a ministry source said, quoted by Reuters.
The blast was heard hundreds of metres away.
“The explosion was very violent, the whole place shook because of it and plumes of smoke rose from the building,” an eyewitness told the agency.
Officials said a second car followed whose occupants opened fire at the complex, and a battle ensued involving gunmen in military uniforms.
The gunmen occupied a hospital at the complex, they added, but security forces later regained control of the building, which was badly damaged.
“The assailants took advantage of some construction work that is taking place to carry out this criminal act,” the defense ministry said.
They were said to be armed with assault rifles, hand grenades and rocket-propelled grenades.
“Most” of the gunmen were killed, officials said, but it was not clear how many were involved.
The incident comes to aid tight security in the last few weeks following a series of hit-and-run attacks on officials by militants on motorbikes, blamed on AQAP.
VJ-GfjFrGP0The US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…