Mortar rounds fired during fighting between Afghan forces and Taliban fighters has killed at least 26 wedding guests in the southern province of Helmand, officials have said.

Most of the victims of the attack late on Wednesday in Helmand's Sangin district were women and children.

General Mahmoud, the deputy Commander of the Afghan 215 corps in the province, said artillery was fired from three directions at a village in Sangin district where the wedding was held on Wednesday.

"What we know so far is that our soldiers fired mortar rounds from three outposts but we do not know whether it was intentional," Mahmoud told Reuters on Thursday.

"We have launched our investigation and will punish those who did this."

Gul Pasha Bakhtiar, deputy provincial police chief, said 26 civilians, including women and children, were killed and 41 wounded by mortar shells fired from the army side.

NATO's war in Afghanistan formally ended on Sunday, when the International Security Assistance Force (ISAF) was replaced by the US-led follow-up mission "Resolute Support", which will focus on training and assisting Afghan forces.

NATO: Job done in Afghanistan?

Helmand is a Taliban stronghold where the US and British troops were involved in years of fierce fighting until the NATO withdrawal.

"The rocket struck in a firefight between Afghan security forces and the Taliban," said Fareed Ahmad Obaid, police spokesman for Helmand province.

Obaid said the victims had been attending a wedding at the time of the attack.

Karem Atal, head of Helmand's provincial council, confirmed the incident and said the toll could rise after many wedding guests were rushed to hospital in Lashkar Gah, the provincial capital.

'Pious resistance'

The foreign force next year will consist of the 12,500-strong NATO mission, most of them US troops, and a US "counter-terrorism" operation outside the NATO remit, though final numbers remain unclear.

In total, an estimated 17,000 foreign soldiers will stay on to assist the local police and army, who face a major challenge as the international military presence declines.

The Taliban issued a statement on Wednesday celebrating the end of NATO's combat mission, adding that no peace talks could happen before all foreign troops leave the country.

"Today, they are evacuating their invading forces from Afghanistan while they are bitterly defeated by the just and pious Afghan resistance," the group said.

"The real solution of the ongoing Afghan crisis is in the complete and unconditional withdrawal of all foreign forces from this country.

"The presence of foreign occupiers is the main cause of instability and chaos."

'Longest war'

The UN said civilian casualties hit a new high this year with about 10,000 non-combatants killed or wounded, 75 percent of them by the Taliban.

The end of NATO's combat mission brought "the longest war in American history ... to a responsible conclusion," US President Barack Obama said this week.

Afghan officials and senior US officers have been pushing Obama to extend US involvement.

US troop numbers are set to halve within 12 months and fall to almost nothing in two years.

President Ashraf Ghani hopes to bring peace to Afghanistan after decades of conflict, saying he is open to talks with any armed group.

Afghan security forces will hold celebrations on Thursday marking the complete transfer of responsibility from NATO.