At least 50 civilians have been killed by militants in northern Afghanistan, officials say.
They report that a checkpoint manned by local police was attacked on Thursday in the Mirzawalang area of Sar-e Pul province.
The assailants then entered a nearby village and shot dead mainly Shia Muslim civilians including women and children, a provincial spokesman said.
"They were killed in a brutal, inhumane way," he added.
Seven members of the Afghan security forces had also been killed, as well as a number of insurgents, he said.
The attack took place over 48 hours and the area was now under insurgent control, local officials said.
A combination of Taliban and Islamic State (IS) group fighters - including foreigners - were involved, a spokesman said. Both are Sunni Muslim militant groups.
The Taliban denied killing civilians, saying that their fighters had killed 28 members of a government-supported militia in the area. There has been no comment from IS.
If verified, it would be rare co-operation between the two groups. IS established a small base in eastern Afghanistan in 2015 and in general its fighters have clashed with the Taliban in a competition for control.
But, correspondents say, in the north of the country allegiances can be more fluid, with some fighters switching sides or co-operating with other groups. A Taliban spokesman told AFP news agency there had been no co-operation with IS, however.
Afghan President Ashraf Ghani condemned the attack.
"Criminal terrorists have once again killed civilians, women and children," he said in a statement on Sunday.
"This barbaric act of them is deemed a direct violation of human rights and a war crime."
Fighting has intensified across Afghanistan in recent months. More than 1,662 civilians were killed in the half of the year, according to UN figures.
Keep you up to date with the world's pulse by APD's selected global headlines, real-time news stories .
A total of 50 Palestinians, including at least 1...
The Nigerian Army has confirmed the killing of tw...
The United States condemns "in the strongest term...
Russia and the United States are expected to hold ...
Syria's Minister of Information Omran al-Zoubi sa...