"We have done with the Battle of Mokha," armed forces spokesman Mohammed al-Naqib told AFP, adding that the rebels had been forced to flee the town.
Another loyalist military source confirmed that government forces were in "full control".
The rebels had put up fierce resistance in the town. Twenty-four rebels and eight loyalist troops were killed in fighting on Wednesday alone.
Mokha was once Yemen's main port serving as the export hub for coffee grown in the highlands.
Also Read
Before the government launched a major offensive on January 7, the rebels controlled virtually all of Yemen's 450 kilometre Red Sea coastline.
But with the support of a Saudi-led coalition the loyalists have made steady gains.
More than 400 combatants have been killed since the offensive began.
Disclaimer: No Business Standard Journalist was involved in creation of this content