The bullet-riddled bodies of 16 Afghan soldiers killed by the Taliban in the north-eastern province of Badakhshan have been handed over to officials.
Sunday's attack was one of the deadliest on Afghan National Army (ANA) forces in recent years.
The insurgents have also freed seven soldiers abducted during the clash near Faizabad, a government official said.
Afghan forces are due to take full charge of security when Nato combat troops leave by the end of 2014.
Badakhshan province - bordering Tajikistan, China and Pakistan - was once seen as one of the safer parts of the country, but there have been more violent incidents and indications of increased Taliban activity and growing violence in recent years.
The official said the security forces were reinforcing their positions on Sunday when they were ambushed by the insurgents.
The attack took place in the volatile district of Wardooj, 60km (37 miles) east of Faizabad, the provincial capital.
The BBC's Bilal Sarwary in Kabul says the area has mountainous valleys and difficult terrain - offering perfect cover for insurgents.
In May last year a prominent anti-Taliban commander in Badakhshan, Nazik Mir, was killed in a suspected Taliban suicide attack.
In August 2010, British doctor Karen Woo was killed in an ambush in the province along with six Americans, one German and two Afghan translators.