Kabul-Afghan security forces have killed the number two mastermind of this month’s bloody Kabul University attack that left 22 people dead, the country’s vice president said Monday.

Amrullah Saleh said the unnamed “second mastermind” was killed in eastern Paktia province, and the number three in charge of the operation captured.

Three gunmen rampaged through Kabul University on November 2, detonating grenades and spraying automatic fire across the campus for several hours.

The attack was claimed by the Islamic State group, although the government blamed the Taliban. 

Afghanistan is grappling with a surge in violence that has worsened despite the government holding peace talks with the Taliban in Qatar. Those talks follow an agreement between Washington and the hardline Islamic group to withdraw all US forces from what has become America’s longest war.

Saleh said the perpetrators of the Kabul University attack had surveyed the campus and identified security weaknesses before launching their assault.

“They dressed up as students and entered the campus with bags full of weapons,” Saleh said in a report posted on his Facebook page. 

“No one checked their bags. Their plan was that if they got caught, they would shoot the police with sidearms.”

Tariq Arian, spokesman for the interior ministry, said Monday that following an investigation, a number of police officers had been sacked for “neglecting their duties”.

They were still being questioned, he said, without giving more details.

Other officials have said the lead organiser had also been arrested, and named him as Mohammad Adel, who they said was recruited by the Haqqani network, an affiliate of the Taliban.

The Haqqani network has long been accused of carrying out brutal assaults on Western forces and civilians, and has been branded a terrorist group by the US.