Taliban fighters have killed at least 26 Afghan soldiers in an attack on their base near the key southern city of Kandahar, the army says.
A defence ministry spokesman said heavy fighting was continuing in the area and reinforcements had been summoned.
Thirteen soldiers were wounded in the overnight battle, the ministry said.
The Taliban say they are in control of the base in Khakrez district. It is the latest in a series of army defeats by the militants in recent months.
Afghan intelligence sources had earlier told the BBC more than 40 soldiers were killed.
One source said the bodies of 30 soldiers had been transferred to Kandahar. Ten soldiers managed to escape, the source said.
Local residents spoke of hundreds of militants attacking the base from all sides in an attack lasting hours, AFP news agency reported.
The Taliban say they killed more than 70 soldiers and captured seven in the fighting. The defence ministry statement, meanwhile, said Afghan troops "bravely resisted" the attack and killed or injured about 80 insurgents.
There is no independent confirmation of either side's claims.
Having captured most of neighbouring Helmand province in recent months, the Taliban have launched a number of offensives in Kandahar and other provinces including Kunduz in the north-east and Faryab in the north-west.
There have also been a string of deadly attacks claimed by the Taliban and Islamic State militants, many in the capital Kabul.
In May the Taliban overran an army outpost in Shah Wali Kot in Kandahar, the Taliban's seat of power in the 1990s.
In April about 170 soldiers are reported to have died in a Taliban attack on an army base outside Mazar-e Sharif in the north.
It was the deadliest single attack on a military installation since 2001 when US-led troops ousted the Taliban from power.
Afghan forces now control just under 60% of the country, according to the latest report by US watchdog Sigar.
The Taliban and other insurgents saw areas they control increase from about 10% to 11% and the rest of the country is contested, the report said.