Gunmen stormed a university campus book fair, shooting dead at least 22 and wounding more than 20 people.
The hours-long siege at Kabul University came as the Iranian ambassador to Afghanistan was attending the event.
Throughout the stand-off, grenades and automatic weapons could be heard across the city and witnesses claimed the attackers were deliberately targeting students.
One of the students, Fathullah Moradi, who escaped through the university’s gates with a group of friends, said: “They were shooting at every student they saw.”
Another, Ahmad Samim, said he saw militants armed with pistols and Kalashnikov assault rifles firing at the law and journalism wing of the school, which is the country’s oldest and has around 17,000 students.
Eventually, security forces shot dead all the three gunmen.