Image copyright Reuters Image caption Teaching was under way when the bomb went off

Forty-eight people have been killed and 67 injured in a bomb explosion at an education centre in Afghanistan's capital, Kabul, officials say.

Police say a suicide bomber walked into the centre while teaching was under way and detonated his bomb belt.

Many of those killed were teenagers who were getting extra tuition as they prepared for university entrance exams.

In the northern province of Baghlan, an attack killed at least nine policemen and 35 soldiers, officials say.

Taliban militants denied involvement in the Kabul attack, in a mostly Shia Muslim area.

The Shia community in Afghanistan has been repeatedly targeted by Sunni Muslim extremists of the Islamic State group, which views the Shia practice of Islam as heretical.

On the same day, the Taliban said it could no longer guarantee safe passage for Red Cross staff working in Afghanistan, amid a row over the treatment of Taliban prisoners in a jail in Kabul.

Who were the victims in Kabul?

The attack on the education centre took place at about 16:00 local time (11:30 GMT).

"We can confirm the attack was caused by a suicide bomber on foot. The bomber detonated himself inside the education centre," police spokesman Hashmat Stanikzai was quoted as saying by AFP news agency.

Image copyright EPA Image caption The bombing comes at a time of renewed unrest in Afghanistan

"Most of the boys at the educational centre have been killed," Sayed Ali, who witnessed the blast, was quoted as saying by Reuters news agency. "It was horrific and many of the students were torn to pieces."

Another man, who gave his name as Assadullah, told AFP news agency how he had run toward the blast scene to try and rescue his 17-year-old brother inside.

"He was a smart and energetic boy, top of his class," he said. "Now... I am not sure he will survive."

Image copyright Reuters Image caption Relatives pictured next to the coffins of policeman who were killed in the Baghlan attack

Afghanistan has seen a recent upsurge in militant violence, including a major Taliban assault on the eastern city of Ghazni.

At least 100 members of the security forces were killed in the fighting at Ghazni, officials have said.

The UN has warned that as many as 150 civilians may have also been killed.

Tadamichi Yamamoto, the UN's Special Representative for Afghanistan, made an appeal on Wednesday for violence to end.

"The extreme human suffering caused by the fighting in Ghazni highlights the urgent need for the war in Afghanistan to end," he said in a statement.

BBC Pashto journalist Assadullah Jalalzai wrote his account of living three days there under siege before he was able to escape.

After five days of fighting, Afghan security forces have now regained control of the city, with Taliban fighters pulling out.