Most of the victims belong to the Shia Hazara community and the assailants were reportedly a mixed group of Taliban and Daesh fighters, but the Taliban denies any involvement.
Insurgents attacked a village in the northern Afghan province of Sar-e-Pul, killing as many as 50 people, including women and children, officials said on Sunday.
Zabihullah Amani, a spokesman for the governor of Sar-e-Pul, said the fighters, who included foreign militants, attacked a security outpost in the Mirza Olang area of Sayaad district overnight, torching 30 houses.
He said fighting was still going on, but as many as 50 people, including children, women and elderly men, most of them members of the largely Shia Hazara community, may have been killed, according to local village elders.
"They were killed in a brutal, inhumane way," he said. Seven members of the Afghan security forces were also killed as well as a number of insurgents.
Many details of the attack, including the identity of the insurgents, were not immediately clear. Amani said they were a mixed group of Taliban and Daesh fighters but the Taliban itself denied any involvement, dismissing the claim as propaganda.
Although the Taliban and Daesh are usually enemies, the allegiance of their forces is sometimes fluid, with fighters from both groups sometimes changing sides or cooperating with militants from other groups.
A senior government official in Kabul said that security forces, including Afghan Air Force attack aircraft, were being sent to the scene.
Fighting has intensified this year across Afghanistan, with dozens of security incidents recorded every day. In the first half of the year 1,662 civilians were killed and 3,581 injured, according to United Nations figures.