The attack happened in Shora Khak area of volatile Kunduz province on Sunday, days after US Defense Secretary Mark Esper said an agreement with the Taliban was in place for a “conditions-based” seven-day reduction in violence.
“Unfortunately, five army soldiers were martyred and three wounded,” the Afghan defense ministry said in a statement, adding that Taliban militants also suffered casualties.
Enhamuddin Rahmani, a spokesman for Kunduz police, said the fighting lasted several hours and both sides suffered casualties.
The Taliban’s official spokesman Zabihullah Mujahid claimed on Twitter that the militants had killed 19 security forces in the attack.
It is not clear when the reduction in violence will begin.
A Taliban official has said it was imminent, and a US official said Friday it would begin “really soon.”
The move is part of a long quest to forge a deal that could eventually lead to a comprehensive cease-fire.
On Monday, a member of Taliban delegation in Doha told a local news agency that the US-Taliban talks had ended “successfully” with an agreement to be released before the end of the month.