Yemeni forces have begun sweeping the capital Sana'a following an al-Qaida attack on defence ministry buildings that killed dozens.

The army is conducting a door-to-door hunt for the perpetrators, triggering clashes in some parts.

The US military is also on full alert and has pledged assistance for local forces.

"The United States military is fully prepared to support our Yemeni partners in the wake of this incident," a senior American defence official told Reuters.

The brazen militant attack on the defence ministry compound in the Yemeni capital killed 57 people and injured 167 others. It also underscored the insurgents' capability to stage a large-scale attack of this kind while Yemen remains unstable.

An al-Qaida-affiliated militant outfit has claimed responsibility for the attack. The operation, which consisted of a suicide bombing followed by a gunfight, was carried out by nearly a dozen Islamist militants.

"As part of the policy of targeting the operation rooms of pilotless planes, the mujahideen [Islamic fighters], have heavily struck one of these rooms in the Ministry of Defence headquarters," Ansar al-Sharia (Partisans of Islamic Law) said in a statement.

"Such joint military locations which participate with the Americans in their war against this Muslim nation are a legitimate target for our operations," it added.

Foreign nationals including Germans, Indians and Vietnamese were also killed in the attack.

The group is an offshoot of al-Qaida in the Arabian Peninsula (AQAP), one of the most powerful and active al-Qaida cells.