Yemeni troops killed 13 fighters in a raid outside the southern city of Mukalla, which was ruled by al-Qaeda until last month.
"Special forces and the army gained complete control over the site backed up by helicopters from the Arab coalition, which dealt with groups of terrorists spread around the area who were fleeing," Yemeni army said in a statement on Sunday.
"A search confirmed that these fighters were about to carry out a surprise terrorist attack on some military command centres at dawn this morning."
A security official said the fighters were from al-Qaeda.
READ MORE: Deadly bombing targets police in Yemen's Mukalla
Hours after the raid three more fighters were killed as a car bomb they were preparing detonated in the courtyard of a house in the Rawkab area where the raid had taken place, residents and a security official told Reuters news agency.
They said that security forces were combing the area for more gunmen and explosives.
Before being forced out, al-Qaeda fighters took advantage of more than a year of war between Iran-allied Houthi forces and supporters of President Abd-Rabbu Mansour Hadi to carve out a mini-state stretching across much of the country's southern coast, including Mukalla.
READ MORE: Rivals begin direct talks in Kuwait
In a separate development, the UN envoy for Yemen said peace talks aimed at ending fighting in the impoverished Arab country were making "incredible progress" and that a halt in fighting is largely holding.
Ismail Ould Cheikh Ahmed said at a forum in the Qatari capital, Doha, on Sunday that a cessation of hostilities is holding about 80 to 90 percent, even if pockets of violence continue.
He said the drop in fighting has allowed much-needed aid to make its way to areas affected by the fighting.
He said he is hopeful that most of the thorniest issues in the conflict have been discussed during peace talks taking place in Kuwait and that a resolution could be "very close."