According to a statement from the UN’s International Office of Migration spokeswoman, the two soldiers were killed while escorting a convoy travelling west from Seiyoun to Marib on Friday.
No IOM staff, who were on an unspecified humanitarian mission, were injured in the attack, said the statement, which gave no further details about the incident.
A tribal leader from the area and a UN official told the Associated Press that the ambush took place near the town of Al Abr, in Yemen’s eastern Hadramawt province. Both spoke on condition of anonymity.
In a separate statement issued on Friday by Lt Gen Saleh Mohammed Timis of Yemen’s Special Tasks Battalion, a branch of the army, the two men were identified as Salem Saeed Qarwan and Salem Mubarak Al-Bahri.
The attackers have not been identified.
Yemen was plunged into civil war in 2014 when Iranian-backed Houthi rebels seized the capital Sanaa. A Saudi-led coalition intervened in 2015 to try to reinstate the internationally recognised government. About 150,000 people have been killed in the conflict, which has created one of the world’s worst humanitarian crises.
Fighting has reignited between various armed groups in recent months in eastern and southern Yemen, which fall under government control,
Al Qaeda also has a presence in the eastern and south. In February, suspected militants from the terrorist group kidnapped five UN workers in the southern Abyan province.