An explosion west Kabul killed at least 40 people, many of them young students, Afghan government spokesperson said.
The explosion hit near Syed Al-Shahda school, in the Shia majority neighbourhood of Dasht-e-Barchi, Interior Ministry spokesman Tariq Arian said.
Arian said at least 52 people were injured in the blast.
Ghulam Dastagir Nazari, spokesman for the health ministry, said 46 people had been taken to hospitals so far.
Kabul is on high alert since Washington announced plans last month to pull out all US troops by September 11, with Afghan officials saying the Taliban has stepped up its attacks across the country.
No group has claimed responsibility for Saturday’s blast.
The Taliban condemned the attack, apparently aimed at civilians, and denied any responsibility.
It took place in a heavily Shia Muslim neighbourhood that has frequently been attacked by ISIL (ISIS) fighters over the years.
The school is a joint high school for girls and boys, who study in three shifts, the second of which is for female students, Najiba Arian, spokeswoman for the Ministry of Education told Reuters.
The wounded are mostly female students, she said.
The European Union mission in Afghanistan condemned what it said was a ‘horrendous attack.’
“[This]… is a despicable act of terrorism,” the mission said on Twitter.
“Targeting primarily students in a girls’ school makes this an attack on the future of Afghanistan. On young people determined to improve their country.”
The United Nations Assistance Mission in Afghanistan (UNAMA) expressed its “deep revulsion” at the blast.
The Dasht-e-Barchi neighbourhood has been a regular target of attacks.
In May last year, a group of gunmen attacked a hospital in the area in a brazen daylight raid that left 25 people killed, including 16 mothers of newborn babies.
The hospital was supported by Doctors Without Borders, the international medical charity, which later pulled out of the project.
No group claimed that attack, but Afghan President Ashraf Ghani blamed the Taliban and ISIL.