Taliban militants have killed at least 26 Afghan soldiers and injured 30 more in an attack on an armyinfo-icon base in Afghanistaninfo-icon's southern Kandahar Province.

The militants "attacked an army camp in the Karzali area of the Khakrez district of Kandahar last night," General Dawlat Waziri, a spokesman for the Afghan Defense Ministry, said on Wednesday.

Waziri said the soldiers "bravely resisted" and killed over 80 of the assailants.

The Taliban have claimed responsibility for the attack.

Meanwhile, at least 50 Taliban militants were reportedly killed in Baghlan-e-Markazi district of northern Baghlan Province during an ongoing operation by Afghan troops on Tuesday night, Afghan mediainfo-icon reported on Wednesday.

More than 20 villages were purged of Taliban militants during the operation, which was launched eight days ago in a bid to clear the area of militants.

Some 70 more Taliban members were also wounded in the operation.

"The Taliban are on the run from the district after suffering heavy casualties," said Deputy Defense Minister General Shoaor Gul.

They had attacked the district eight days ago and gotten close to the center of the district.

According to authorities, the Afghan Air Force provided support for ground forces in the operation, and the militants suffered most of the casualties in the aerial operations.

Insecurity has gripped Afghanistan since 2001, when the United Statesinfo-icon and its allies invaded the country as part of Washington's so-called warinfo-icon on terror. Many parts of the country remain plagued by militancy despite the presence of foreign troops.

In addition to the Taliban, the Takfiri Daesh terrorist group -- which is mainly active in Syriainfo-icon and Iraqinfo-icon -- has managed to gain a foothold in Afghanistan.