The latest bloodshed came a day after clashes in which 18 militants and seven soldiers died in southern and southeast Yemen. An earlier toll had said 10 soldiers were killed yesterday.
Gunmen attacked the military headquarters in the city of Sayun, a stronghold of jihadists, a military official said, leaving seven dead among the assailants along with one soldier.
The army had reinforced its positions in Sayun ahead of an anticipated operation against militants in the city.
"The assailants failed to penetrate the barracks but three soldiers were killed and four wounded," he said, in a toll confirmed at the town's hospital.
More From This Section
A local official said four militants were also killed.
The attack was followed by air strikes on Al-Qaeda positions near Qatan, witnesses said, although there was no immediate casualty toll for the raid.
Seven soldiers were killed yesterday when gunmen ambushed forces heading towards Sayun, a military official said, while the defence ministry said 18 militants also died.
In late April, the army launched a ground offensive against AQAP in Shabwa and nearby Abyan provinces.