The officials said the attack took place in a mountainous area in al-Saied in the southern Shabwa province. One of those killed in the attack was a suspected al-Qaida leader named Musaad al-Habashi, the officials said, speaking on condition of anonymity because they were not authorised to speak to the press.
The US considers Al-Qaida in the Arabian Peninsula to be the group's most dangerous branch in the world and has linked it to a number of botched or foiled attacks on the US homeland.
The militant group overran large swaths of territory in southern Yemen in 2011, taking advantage of political turmoil that forced longtime leader Ali Abdullah Saleh to step down.
Since, the Yemeni military has pushed back, and over the past few weeks has stepped up an offensive to rout the fighters from their strongholds.
Al-Qaida militants have also hiked up their attacks against troops and government officials.