Image copyright Reuters Image caption Afghan troops have struggled to regain control of Kunduz from the Taliban

Thirty civilians have been killed in northern Afghanistan during an Afghan special forces mission supported by Nato, an Afghan spokesman says.

Provincial officials say many of the deaths were caused by Nato air strikes.

The air support was called in after troops were surrounded by Taliban militants, who took shelter in civilian homes, the spokesman said.

Nato says it will investigate reports of civilian deaths. Two US soldiers were also killed in the fighting.

"US forces conducted strikes in Kunduz to defend friendly forces. All civilian casualty claims will be investigated," the Nato-led Resolute Support mission said.

Mahmood Danish, a spokesman for the governor of Kunduz province, told the BBC the operation took place in an area called Body Kandahari, about 5km (3 miles) from Kunduz city centre.

There were angry protests from civilians, who brought bodies of some of the dead to the governor's office in Kunduz city.

Images showed the body of an infant girl being carried by a group of civilians.

Taza Gul, a 55-year-old labourer, said: "I am heartbroken. I have lost seven members of my family. I want to know, why these innocent children were killed? Were they Taliban? No, they were innocent children."

A further 25 civilians were wounded in the operation in Kunduz, Mr Danish said, and 26 Taliban fighters were killed, including two commanders. The Taliban say only three of their fighters were killed.

US soldiers killed

The US military said its soldiers died after coming under fire during a mission to clear a Taliban position.

Two other US soldiers were wounded, it said. General John Nicholson said the soldiers' loss was "heartbreaking".

Taliban fighters came close to overrunning Kunduz city last month and the security situation in the area remains febrile. The insurgents control large areas of the province around the city.

US combat operations against the Taliban officially ended in 2014 but special forces have continued to provide support to Afghan troops.

Afghan forces have suffered thousands of casualties, with more than 5,500 killed in the first eight months of 2016.