SANAA, Yemen — The Yemeni military said it wrested control of a southern town from al-Qaida fighters after three days of clashes that killed 17 people.

Military officials said 12 al-Qaida fighters were killed and five soldiers and members of local tribes fighting alongside the army died in the clashes.

Local militiamen had joined the military offensive to push out al-Qaida.

Tribal sources said the al-Qaida fighters fled al-Maraksha on Saturday to East Ahwar, about 80 kilometers outside the Abyan provincial capital of Zinjibar.

All spoke on condition of anonymity because they were not authorized to release the information.