At least 48 people have died following a suicide blast in a mainly Shia area of Kabul, the latest in a wave of attacks that have killed hundreds of civilians, soldiers and policemen over recent days.
The explosion, targeting an educational centre in the west of the Afghan capital, tore through a large tent set up as a classroom in the courtyard, killing dozens of teenagers studying for a university entrance examination. The blast, which shattered weeks of relative calm in Kabul, also wounded at least 67, including both male and female students.
"Most of the boys at the educational centre have been killed," said Sayed Ali, who witnessed the blast. "It was horrific and many of the students were torn to pieces."
Doctors at city hospitals, where people had gathered to try to find relatives who had been studying at the centre, said many of the victims were severely burned.
"My brother was studying at the centre and he was killed. I'm here to get his body," said Abdul Khaliq, waiting outside the Isteqlal hospital.
There was no immediate claim of responsibility for the Kabul blast but the attack bore the hallmark of Islamic State, which has conducted many previous attacks on Shi'ite targets.
The Taliban issued a statement denying it was involved.
The explosion, which came as the central city of Ghazni struggles to recover from five days of intense fighting between the Taliban and government forces, underlined how badly security in Afghanistan has degenerated, some two months before parliamentary elections scheduled for October.
Earlier, local officials said at least nine policemen and 35 soldiers were killed in an attack on their base in the northern province of Baghlan, the latest of a series that has killed dozens of members of the security forces nationwide.
The United Nations Assistance Mission in Afghanistan called for the fighting to stop, saying up to 150 civilians are estimated to have been killed in Ghazni, where the public hospital was overwhelmed and water and electricity supplies cut.
"The extreme human suffering caused by the fighting in Ghazni highlights the urgent need for the war in Afghanistan to end," the top UN official in Afghanistan, Tadamichi Yamamoto,said in a statement.
The Taliban, who launched their Ghazni assault last Friday and battled Afghan forces backed by U.S. air strikes in the middle of the city for days, said their fighters had been pulled out to prevent further harm to the city's population.
"They were facing severe shortages of food and drinking water as the power supply was also suspended two days ago," a Taliban commander, who declined to be identified, said by telephone.
The International Committee of the Red Cross said it was providing dressing packages and oral and intravenous medicine to treat the wounded, along with electricity generators and fresh water for about 18,000 people.
The Ghazni attack, one of the Taliban's most devastating in years, has clouded hopes for peace talks that had been prompted by an unprecedented ceasefire during the Eid celebration in June and a meeting last month between Taliban officials and a senior US diplomat.
Two senior Taliban leaders told Reuters this week the group was considering announcing a ceasefire for the feast of Eid-al Adha, which begins next week, but the future of any peace process remained uncertain.
With parliamentary elections due on 20 October, authorities had been bracing for more attacks in Kabul and other cities, but even so, the scale of the violence has come as a shock to a government facing bitter criticism over its handling of the war.
In the southern province of Zabul, Taliban insurgents clashed with soldiers on Tuesday, forcing the government to send reinforcements from neighbouring provinces to retain control of two checkposts.
The clashes killed 11 soldiers and one policeman, with three soldiers wounded, said Haji Atta Jan Haqbayan, a Zabul provincial council member.
Separately, six girls younger than 10 were killed when an unexploded mortar they picked up to play with suddenly exploded on Wednesday, officials in the eastern province of Laghman said