The militants seized the camp of the 19th Infantry Brigade in Baihan, a town in southern Shabwa province, the official said, adding that three soldiers were among those killed.
Ansar al-Sharia, the main arm of Al-Qaeda in Yemen, claimed the attack in a statement on Twitter, accusing troops at the camp of links to the Shiite Huthi militia controlling the capital.
It published pictures of its militants raising the black and white flag of Al-Qaeda at the camp entrance, as well as pictures of soldiers it claimed to have captured.
The tribes are demanding Al-Qaeda hands over the arms.
The attack came a day after the United States, Britain and France announced the closure of their embassies in Sanaa, citing security fears after the Huthis took power in the capital.
Yemen-based Al-Qaeda in the Arabian Peninsula (AQAP) is seen by the United States as the deadliest branch of the global extremist network.
AQAP claimed responsibility for last month's attack on French satirical magazine Charlie Hebdo that left 12 people dead.
Yemen, a deeply tribal country, has been shaken by growing unrest since the Huthis seized control of Sanaa in September before pushing farther south.
The Huthis dissolved parliament and declared a "presidential council" last week after Western-backed president Abedrabbo Mansour Hadi tendered his resignation saying he could no longer govern.
Yemeni authorities have for years allowed the United States to carry out drone strikes against AQAP on their soil, and Hadi had been a key US ally in fighting Al-Qaeda.
