At least 19 people have been killed in Afghanistan's capital in a gun battle that erupted around the time government officials were expected to arrive for the opening of an Iranian book fair event.

Afghan policemen keep watch near the site of an attack in Kabul, Afghanistan, November 2, 2020.
Afghan policemen keep watch near the site of an attack in Kabul, Afghanistan, November 2, 2020. (AFP)

An hours-long gun battle between the militants and security forces at Kabul University has left at least 19 dead and 22 wounded.

The fighting erupted after gunmen stormed the war-torn country's largest school as it hosted a book fair attended by the Iranian ambassador to Afghanistan.

The Interior Ministry’s spokesperson, Tariq Arian, said there were three attackers involved in the assault, all of whom were killed in the ensuing firefight. 

Daesh claimed responsibility for the attack on its propaganda arm Amaq.

The 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, aim to help the US finally withdraw from America's longest war, though daily bloodshed continues and a Daesh affiliate launches its own attacks on Shias in the country.

READ MORE: Senior Al Qaeda leader al Masri killed in Afghanistan – security officials

Book exhibition

Five hours into the fighting, sporadic grenade explosions and automatic weapons fire echoed down the empty streets surrounding the university's fenced compound. Afghan troops stood guard. Earlier, students were seen fleeing for their lives from the site.

"Unfortunately, there are casualties,” Arian said as the assault unfolded, without elaborating.

Ahmad Samim, a university student, told journalists he saw militants armed with pistols and Kalashnikov assault rifles firing at the school, the country's oldest with some 17,000 students. He said the attack happened at the university's eastern side where its law and journalism faculty teach.

Afghan media reported a book exhibition was being held at the university and attended by a number of dignitaries at the time of the shooting.

While Afghan officials declined to discuss the bookfair, Iran's semiofficial ISNA news agency reported on Sunday that Iranian Ambassador Bahador Aminian and cultural attaché Mojtaba Noroozi were scheduled to inaugurate the fair, which would host some 40 Iranian publishers.

Iranian state TV reported on the attack, but did not offer information on its officials.

Iranian diplomats have been targeted previously by attacks in the country and nearly sparked a war between the two countries. In 1998, Iran held the Taliban responsible for the deaths of nine Iranian diplomats who were working in its consulate in northern Afghanistan and sent reinforcements to the 950-km-long border that Iran and Afghanistan share.

Relentless violence

Last month, Daesh sent a suicide bomber into an education centre in the capital’s Shia neighbourhood of Dasht-e-Barchi, killing 24 students and injuring more than 100. 

Daesh's affiliate in Afghanistan has declared war on Afghanistan’s minority Shia Muslims and have staged dozens of attacks since emerging in 2014.

Schools have been targeted for attacks in the past as well. Last year, a bomb outside of Kabul University campus’ gates killed eight people. In 2016, gunmen attacked the American University in Kabul, killing 13.

Violence has been relentless in Afghanistan even as the Taliban and a government-appointed negotiation team discuss a peace agreement to end more than four decades of war in the country. 

The talks in Qatar have been painfully slow and despite repeated demands for a reduction in violence, the chaos has continued unabated.

A US deal with the Taliban in February set the stage for peace talks currently underway in Doha. The deal also allows for the withdrawal of US and NATO troops from Afghanistan.

Meanwhile, on Monday, a vehicle hit a roadside mine in the country's southern Helmand province, killing at least seven civilians, most of them women and children, provincial governor spokesperson Omer Zwak said.

READ MORE: Casualties after attack on Afghan police base in Khost city

Source: Reuters