The fighters killed more than 50 men, women and children in the remote Sayad district of northern Sar-e Pul province on Saturday after overrunning the Afghan Local Police (ALP) -- a government-backed militia -- in a 48-hour battle, according to local officials.
"It was a joint operation by Daesh (IS) and Taliban fighters. They had recruited forces from other provinces of the country and attacked Mirzawalang village," Zabihullah Amani, a spokesman for the provincial governor, told AFP.
The spokesman alleged that dozens of Taliban and IS group fighters under the command of Sher Mohammad Ghazanfar, a local Taliban commander who Amani claims pledged allegiance to IS, launched a co-ordinated attack on the area on Thursday.
"The fighters overran the area and it led to the massacre of innocent and defenceless civilians," he said.
Most of those killed were shot but some were beheaded, Amani said.
Verifying information from poor, mountainous areas of Afghanistan made inaccessible by fighting and with patchy communications is difficult, and AFP was not able to access the village.
Mohammad Noor Rahmani, head of Sar-e-Pul's provincial council, said 44 of the 50 victims were believed to be civilians, with the ALP militia also suffering casualties.
"This is not the final toll. It might change because the area is inaccessible and no telephone networks are working to get an update," he told AFP.
The Taliban and Islamic State fighters have regularly clashed since the latter gained a foothold in eastern Afghanistan in 2015, as the two vie for supremacy in the war-torn country.
An Afghan security source told AFP there had been around three incidents in the past where fighters from both groups had teamed up to deal a blow to Afghan forces in certain areas.
Zabihullah Mujahid, a spokesman for the Taliban, confirmed to AFP that it had captured Mirzawalang village but said it had done so alone. It also denied allegations it had killed civilians.
"It was an independent operation by our mujahideen forces. There is no cooperation with the Islamic State on the operation," said the spokesman.
An Afghan police officer inspects vehicles at a checkpoint in Kabul, Afghanistan
The Taliban and Islamic State group jointly massacred dozens of civilians in an Afghan village, officials said Monday, highlighting rare co-operation between the insurgents that could increase the strain on Afghanistan's beleaguered security forces.