Kabul: Gunmen stormed Kabul University on Monday, an hours-long assault that saw students left in pools of blood in their classrooms.
This is the second attack on an educational institution in the city in just over a week, officials and witnesses said.
Survivors described horrific scenes following the incident when a suicide bomber blew himself up inside the campus. Two gunmen then started shooting, officials said, sending hundreds of students fleeing and scrambling over perimeter walls.
Fraidoon Ahmadi, a 23-year-old student, told AFP he was in class when gunfire broke out at the university. "We were very scared and we thought it could be the last day of our lives... boys and girls were shouting, praying and crying for help," Ahmadi said.
He said he and other students were besieged for more than two hours before being rescued. Distressing images posted online showed what appeared to be the bodies of slain students lying by desks and chairs.
“They were shooting at every student they saw ... they even shot at the students who were running away,” witness Fathullah Moradi told Reuters.
In all, 25 people had been killed by the time the security services ended the assault. The attackers involved in the assault also perished in the ensuing firefight.
As the sun slowly set over the Afghan capital, there were few details though the Taliban issued a statement denying they took part in the assault.
The Islamic State group later took responsibility for the brutal shooting.
A suicide bomber killed 24 people, including teenage students at an education centre in Kabul on October 24. The Islamic State had then too claimed responsibility.
The latest attack came as the insurgents are continuing peace talks with the US-backed government. Those negotiations, taking place in the Gulf Arab state of Qatar, will enable the US to finally withdraw from America's longest war.
Kabul University is the country's oldest with some 17,000 students. The attack happened at the university's eastern side where its law and journalism departments are located.
President Ashraf Ghani vowed to take revenge. "This attack will not remain without response, we will retaliate." Authorities have declared Tuesday as a day of national mourning.