The clash erupted in the Wadi Dawan area, near an oil field, the official said.
Witnesses said armed tribesmen attacked a military convoy carrying supplies to their post, triggering the gunbattle.
They said some of the assailants were killed, without specifying how many.
The attack comes amid rising security fears in Yemen since the Shiite Huthi militia tightened its grip on power in the capital Sanaa this month, prompting an exodus of foreign diplomats.
Elsewhere, a military intelligence officer was gunned down in the southern city of Aden, where various armed groups opposing the Huthis are increasingly in control.
Also Read
Al-Qaeda in the Arabian Peninsula, which the United States considers the jihadist network's most dangerous branch, remains active in the south of Yemen.
The Huthis' attempt to extend their control has been met by deadly resistance from AQAP.
Sunni tribes have also fought the Shiite militia since it overran Sanaa in September.
AQAP frequently attacks both Yemeni security forces and Western targets.