The counter offensive was launched in Burka district of northern Afghanistan's Baghlan province.
"Taliban rebels began multi-pronged attacks early Tuesday to overrun Burk district but their attempts have been foiled following counter offensive and the militants, after leaving 32 bodies, fled away," Sarih was quoted as saying by Xinhua news agency.
Several militants were injured in the firefight.
The official, however, avoided commenting on possible casualties of security forces in the fight against Taliban fighters, saying "only seven security personnel have been killed across Baghlan province in operations against Taliban" over the past seven days.
Security forces also recaptured Qala-e-Zal district in the northern Kunduz province on Tuesday, forcing Taliban insurgents to flee the area.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)