LAHORE - At least 19 people were killed and 22 wounded when gunmen stormed Kabul University in Afghanistan’s capital in an attack that ended after hours of fighting with security forces.

Hamid Obaidi, spokesman for the Ministry of Higher Education, reporters the Monday’s attack started when government officials were arriving for the opening of an Iranian book fair organised on campus.

Eye witnesses said hundreds of people were sent fleeing and scrambling over walls of the campus when the attack took place. “The attack is over, but sadly 19 people have been killed and 22 more wounded,” Interior Ministry spokesperson Tariq Arian said. “Three attackers were involved. One of them blew up his explosives at the beginning; two were brought down by the security forces.”

Witnesses said the attack followed an explosion in the area and students spoke of chaos and confusion.

“We were studying inside our classrooms when suddenly we heard a burst of gunfire,” said student Fraidoon Ahmadi, 23. “Some students have fled … it is chaotic and students are terrified,” he added.

Kabul police spokesman Ferdaws Faramerz said most of those killed were students. Afghan media reported the book exhibition was being attended by several dignitaries at the time of the shooting.

Iran’s semi-official ISNA news agency reported on Sunday that Iranian Ambassador Bahador Aminian and cultural attache Mojtaba Noroozi were scheduled to inaugurate the fair, which was to host some 40 Iranian publishers.

The Taliban said it was not involved in the incident that took place at Afghanistan’s biggest university, but several education centres have been attacked over the years by armed groups, including ISIL (ISIS).

Last year, a bomb outside the campus gates on Kabul University killed eight people. In 2016, 13 people were killed when gunmen attacked the American University in Kabul. At least 24 students were killed last month when ISIL fighters carried out a suicide bombing at an education centre in the capital’s Shia-majority neighbourhood of Dashte Barchi. Violence has plagued Afghanistan while government and Taliban negotiators have been meeting in Qatar to try to broker a peace deal that would allow the United States to withdraw its troops and end its longest war.