A suicide bomber rammed an explosives-packed car into the Yemeni defence ministry complex Thursday, allowing gunmen to launch an assault which killed 25 people including three foreign doctors, officials said.
The brazen attack on the sprawling facility follows a spate of hit-and-run strikes on military personnel and officials, as the country struggles to complete a thorny political transition.
The attacks in the capital and in the south have generally been blamed on Al-Qaeda in the Arabian Peninsula (AQAP), which Washington regards as the jihadist network's most dangerous branch.
"At least 25 people have been killed," a security official said.
Six doctors -- a Venezuelan, two Filipinos and three Yemenis -- along with five patients including a judge, were among the dead, medical sources said.
They were at a hospital within the ministry complex which bore the brunt of the attack.
"A car bomb driven by a suicide bomber forced its way into the western entrance of the ministry complex," a security official told AFP.
"It was followed by another car whose occupants opened fire at the complex of buildings," he said.
The attack comes as Defence Minister Mohammed Nasser heads a military delegation on a visit to the United States.
The ministry said gunmen occupied the hospital after the explosion, but that security forces had regained control of the building.
"The assailants took advantage of some construction work that is taking place to carry out this criminal act," it said without elaborating.
A security source said that, in another apparently coordinated attack, a gunfight raged outside the complex after the explosion, before government forces regained control and cordoned off the area.
State television aired gory footage of mangled bodies of what it said were suicide bombers, strewn in the hospital yard amid charred vehicles.
It also showed massive destruction within the hospital and floors stained with blood.
Appeals for blood donors
Signup to our newsletter and follow us on Facebook and Twitter!
The channel broadcast appeals for blood donors to come to hospitals treating the wounded.
Smoke billowed across the complex on the edge of Baba al-Yaman neighbourhood after the blast and as the firefight erupted.
"I heard a series of explosions, and then an exchange of fire," a wounded soldier told AFP.
President Abdrabuh Mansur Hadi visited the hospital where his 90-year-old brother, Ahmed, was apparently an in-patient.
He ordered an investigation into the attack, state television said.
Yemen has been going through a difficult political transition since veteran president Ali Abdullah Saleh was ousted in February 2012 after a year of deadly protests against his 33-year rule.
The transition aims to culminate in a new constitution and pave the way for parliamentary and presidential elections slated for February 2014, but many hurdles remain.
There are growing demands for the secession of the formerly independent south, in addition to on-off fighting in the far north between Shiite rebels and hardline Sunnis.
A national dialogue that began in March and was originally due to end on September 18 has yet to conclude.
"The terrorists behind this heinous crime aim to shake the security of Yemen... and hinder the political solution," said Abdullatif al-Zayani, secretary general of the Gulf Cooperation Council, which brokered Saleh's exit deal.
UN chief Ban Ki-Moon, whose special envoy Jamal Benomar has been shuttling between the rival sides trying to get the national dialogue back on track, issued a statement condemning the attacks "in the strongest terms".
"The secretary general firmly believes that the only path to a stable, prosperous and democratic Yemen is through the ongoing peaceful and all-inclusive national dialogue conference," a statement said.
Yemen is also battling AQAP which often attacks the security forces, despite suffering setbacks in a major army offensive last year and repeated US drone strikes targeting its commanders.
In an attempt to halt hit-and-run attacks, the authorities last week imposed a temporary ban on motorbikes in Sanaa to prevent shootings that have killed dozens of officials.
Last week, two gunmen on a bike killed a Belarussian defence contractor and wounded another.