The Yemeni army seized the Al-Qaeda strongholds of Jaar and Zinjibar on Tuesday, officials said, more than a year after the jihadists captured most of Abyan province.
In the first major victories of a month-long offensive, troops backed by armoured vehicles entered the town of Jaar after Al-Qaeda gunmen withdrew during the night.
Hours later, they took control of the provincial capital Zinjibar, officials and witnesses said.
Al-Qaeda militants had overrun most of the southern province early last year, taking advantage of the weakening of the central government by Arab Spring-inspired protests in the major cities.
"With the cooperation of the citizens of Abyan... the heroes of the armed forces and the popular resistance committees have taken full control of the city of Jaar," the defence ministry said, quoting southern military commander Salem Ali Qoton.
"Al-Qaeda has suffered heavy losses... and dozens of militants have fled," said Qoton, adding that the army had reopened the main road linking Abyan with the southern port city of Aden.
The army then took control of Zinjibar, 12 kilometres (7.5 miles) to the southeast, another senior officer said.
"Zinjibar in total has fallen," said General Mohammed al-Somali, commander of 25th Mechanised Brigade. "Al-Qaeda fighters have fled the city after the noose was tightened on them."
Twenty Al-Qaeda fighters and four soldiers were killed in Tuesday's fighting in Jaar, Qoton said.
The bodies of six militants were found in Zinjibar, another officer said.
Al-Qaeda released a statement confirming it had withdrawn from both Zinjibar and Jaar but insisting it had done so "not under military pressure but rather to prevent the further bloodshed of Muslims."
As news of Al-Qaeda's ouster from Zinjibar spread, dozens of residents who had fled the fighting began returning to their homes.
"I returned to find my home flattened," Salmeen Saleh Bawzeer told AFP.
According to the latest UN figures, more than 160,000 people had fled their homes in Abyan over the past year.
In Jaar, remaining residents unleashed volleys of celebratory gunfire after the militants pulled out, witnesses said.
Vehicles carrying militants, their weapons and furniture were seen heading east towards the coastal town of Shuqra, where many Al-Qaeda leaders are believed to be holed up.
Before they left, the militants distributed pamphlets apologising to residents for dragging Jaar into a conflict with the army and for the damage caused by the fighting.
The military victories came just hours before the UN Security Council unanimously passed a resolution threatening sanctions against groups seen as undermining Yemen's political transition.
The family and supporters of ousted strongman Ali Abdullah Saleh, although not named in the text, are a particular target of the warning in Resolution 2051, diplomats said.
Saleh has been accused by his opponents of intentionally allowing Al-Qaeda to take hold of large swathes of the south and east.
The Security Council also gave its strong support to President Abdrabuh Mansur Hadi's efforts to reform the security forces, some of which remained under the command of Saleh relatives after he stepped down, and launch a national conference of rival factions.
During his swearing-in in February, Hadi pledged to destroy Al-Qaeda. Three months later, on May 12, he ordered an all-out offensive aimed at reclaiming towns and cities lost to the militants during the past year.
Western diplomats say US experts have been assisting the army in its fight with Al-Qaeda in the Arabian Peninsula, the jihadist network's Yemen branch which Washington considers to be its deadliest and most active.
In recent weeks, the United States has also escalated drone strikes against Al-Qaeda in Yemen, killing several dozen militants.
Since the army launched its offensive last month, 515 people have been killed, according to an AFP tally compiled from various sources. They comprised 394 Al-Qaeda militants, 76 soldiers, 26 militiamen and 19 civilians.