Thursday’s fighting was a sharp escalation in violence ahead of next month’s landmark presidential election.
At least seven more soldiers were killed in other clashes in the southern province of Zabul on Tuesday and Wednesday, provincial officials said.
They added that some Taliban members were also killed, but no details were available.
Kheyal Muhammad Husseini, the Zabul governor, said the latest clashes erupted after fighters attacked a government post in the Sori district of the troubled province and killed 12 soldiers.
The governor did not have further details of the fighting in the province, the scene of repeated attacks by Taliban fighters over the past three days.
US convoy attacked
On Wednesday, they attacked a joint convoy of US and Afghan forces. The Taliban said several US soldiers were killed, but there has been no independent verification.
Zabul is near the border with neighbouring Pakistan that has seen much violence since the fall of the Taliban government.
More than 1000 people have been killed since August last year in violence linked to remnants of the Taliban, toppled from power after a US-led war in 2001.
Most of the presidential candidates have called for the forthcoming poll to be delayed until security improves, but interim leader Hamid Karzai has said the vote will take place on schedule.
The election has been delayed twice before.