The Islamic State (IS) extremist group has claimed responsibility for an attack on Kabul University that killed at least 22 people.
Interior Ministry spokesman Tariq Arian said three gunmen stormed the university on November 2 before engaging security forces in an hours-long battle. Arian said all three attackers were killed in the battle.
The Health Ministry said 22 people were wounded in the violence, with officials saying most of the casualties were students.
Witnesses said the attack followed an explosion in the area.
The fighting between assailants and security forces lasted more than five hours, with sporadic grenade blasts and automatic weapons fire being heard from inside the university's fenced compound, as Afghan troops stood guard.
The attack was said to have begun before the arrival of government officials for a joint Afghan-Iranian bookfair.
However, the IS group posted a message on the Telegram app saying two of its fighters had targeted "the graduation of judges and investigators working for the apostate Afghan government."
Shahrzad Akbar, head of the Afghan Independent Human Rights Commission (AIHRC), called the attack “very worrying.”
“It sends the bigger message that unfortunately in Afghanistan…no place is safe. Citizens are not safe at home, on the road or in educational and work environments," he told RFE/RL.
NATO Senior Civilian Representative to Afghanistan Stefano Pontecorvo condemned the attack, noting that it was the second on a Kabul educational institution in 10 days.
"Afghan children & youth need to feel safe going to school," he said.
An attack late last month on an education center in Kabul killed 24 people, mostly students.
Last year, a bomb outside of the Kabul University campus gates killed eight people. In 2016, gunmen attacked the American University in Kabul, killing 13.
Last month, the Islamic State group sent a suicide bomber into an education center in the capital's Shi'a-dominated neighborhood of Dasht-e-Barchi, killing 24 students.
In a separate incident on November 2, a roadside mine destroyed a vehicle in the country's southern Helmand Province, killing at least seven civilians, most of them women and children, said Omer Zwak, the provincial governor's spokesman.
Violence has continued in Afghanistan even as the Taliban and a government-appointed negotiation team hold talks in Qatar to end more than four decades of war in the country.
A U.S. deal with the Taliban in February set the stage for the talks in Doha. The deal also allows for the withdrawal of U.S. and NATO troops from Afghanistan.