Militants suspected of being part of Al-Qaeda opened fire on a military checkpoint on Sunday killing five Yemeni soldiers and wounding three more, an army source said.
The gunmen managed to escape after the attack in the northeast of Shabwa province, a southern stronghold of Al-Qaeda in the Arabian Peninsula (AQAP).
The attack is the latest in a string of suspected AQAP shootings targeting military checkpoints and outposts in Yemen.
AQAP, seen by the US as the global terror network's most dangerous branch, has exploited years of deadly conflict between Yemen's government and Huthi rebels to expand its presence, especially in Shabwa.
A US air raid on the province last month killed AQAP emir Abu Khattab al-Awlaqi, according to the Pentagon.
US intensifies attacks on AQAP
The US has intensified its air attacks on suspected AQAP sites in Yemen since President Donald Trump took office in January.
Yemen's government, allied with a Saudi-led Arab military coalition, has for years been battling Houthi rebels for control of the impoverished country.
The Houthis seized control of the capital Sanaa in September 2014 and advanced on other regions aided by troops loyal to former President Ali Abdullah Saleh.
The World Health Organisation estimates that more than 8,000 people have been killed in Yemen's conflict, most of them civilians, since the Saudi-led coalition entered the conflict in 2015.
The country has also been hit by a deadly cholera outbreak and is on the edge of famine.