The Taliban has released 235 people held hostage following a brutal attack on villagers in northern Afghanistan, officials say.

The hostages were freed on Tuesday, days after it was reported 50 civilians, including women and children, had been massacred in the Mirzawalang area of Sar-e Pul province.

But a provincial spokesman told the BBC many more were still trapped.

Taliban and Islamic State (IS) militants attacked the area last week.

The battle began on Thursday when a checkpoint manned by local police was attacked. Two days later, the militants entered the village and killed people - mainly Shia Muslims - in "a brutal, inhumane way", according to a provincial spokesman.

Seven members of the Afghan security forces had also been killed, as well as a number of insurgents, the spokesman said.

The Taliban denied killing civilians, saying that their fighters had killed 28 members of a government-supported militia in the area, and denied working with IS. There has been no comment from IS. Both are Sunni Muslim militant groups.

'Shocked'

On Tuesday, following negotiations led by the provincial governor and local tribal elders, a large number of hostages were released.

But Governor Mohammad Zaher Wahdat told Afghan channel Tolo News they had not been able to recover the bodies.

He said the hostages, who have been taken to the provincial capital, "are so shocked they can't even speak to tell us about any more other hostages".

One security source told news agency AFP there were as many as 100 people still being held.

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.