The Taliban intensified attacks in a district heavily populated by minority Hazaras Sunday, as US envoy Zalmay Khalilzad returned to the region as part of efforts to convince the group to end the 17-year war.
In pre-dawn fighting in Jaghori district in the southeastern province of Ghazni, militants killed 15 civilians and 10 members of Afghanistan's elite special forces, provincial police spokesman Ahmad Khan Sirat told AFP.
Another six special forces and eight civilians were wounded, Sirat added.
The information could not be immediately verified by another source in the province where telecommunications are poor. A spokesman for the Afghan defence ministry in Kabul would not answer his phone.
Taliban spokesman Zabiullah Mujahid said in a WhatsApp message that 22 Afghan commandos had been killed and "a large number" wounded.
Fighting in the district has been ongoing since Wednesday, fanning fears that the violence could be rooted in ethnic or sectarian differences.
Kabul deployed special forces to the area on Thursday to reinforce local Hazara pro-government fighters, as the Taliban denied targeting "any specific race, ethnicity or sect".
Most Hazaras belong to the Shia branch of Islam. The Taliban, which are Sunni and largely ethnic Pashtuns, have been accused of committing human rights violations against the group during their oppressive 1996-2001 rule.
The flare up in violence coincided with the return of Khalilzad to Afghanistan as he seeks to coordinate regional efforts to bring about peace in the war-torn country.
Khalilzad met with President Ashraf Ghani on Saturday. The former US ambassador to Kabul also will visit Pakistan, United Arab Emirates and Qatar, where the Taliban has a political office.
A Taliban delegation met with Khalilzad in Doha in October to discuss ending the Afghan conflict.
That was followed by a Russia-led international gathering in Moscow on Friday that included Taliban representatives.
The Afghan government boycotted the meeting, but the country's High Peace Council, which is responsible for reconciliation efforts with the militants, sent a delegation.
The flurry of diplomatic efforts to kickstart peace talks comes as the Taliban make gains on the battlefield and cause record-high casualties among security forces.
A recent US government watchdog report said Kabul's control of Afghanistan had slipped in recent months as local forces made little or no progress against the Taliban.
In a grim assessment of the war, the US Special Inspector General for Afghanistan Reconstruction (SIGAR) cited NATO's Resolute Support mission as saying this summer's casualty toll for Afghan forces had been worse than ever.