The rare positive news for the Afghan military comes as the Taliban are expanding their 14-year-insurgency with an unprecedented winter surge, which analysts suggest is aimed at increasing their leverage before planned peace talks.
Afghan army, police and special forces units launched a fierce offensive on Friday to recapture Darqad in Takhar province.
They defeated the Taliban after two days of intense fighting that left many militants dead or wounded, the defence ministry said in a statement on Sunday.
“The district has been entirely captured by the Afghan forces, the enemy suffering heavy casualties have been defeated,” it said.
Some twenty militants and one Afghan soldier had died in two days of fighting, it added.
A Takhar provincial spokesman confirmed the news, adding that some militants were hiding in the residential areas of the district.
“A search and clearance operation is ongoing to arrest or kill these militants hiding in people’s houses,” Sonatullah Timor told AFP.
Darqad, located on the banks of the Oxus river on the border with Tajikistan, was captured by the militants in late October in a battle that had left at least six Afghan security force members dead.
Afghan troops and police have been struggling to contain the Taliban insurgency since US-led foreign troops ceased combat operations at the end of 2014.
Afghan government officials have said in the past the Taliban had joined forces with militants of the Islamic Movement of Uzbekistan and other organisations with the goal of spreading northward into Central Asia.
The fighting comes as Afghan and Pakistani officials, along with counterparts from China and the United States, are preparing for meetings in Islamabad on Monday to lay out a roadmap for possible peace talks with the Taliban.
The talks are meant to lay the groundwork for direct dialogue between Kabul and the Islamist group, who were ousted from power by NATO forces in 2001.