Afghanistan has arrested a former student of Kabul University for masterminding the deadly attack on its campus this month, Vice President Amrullah Saleh said on Saturday. At least 22 people were killed and another 27 wounded when three gunmen rampaged through the university on November 2, spraying classrooms with bullets for several hours before they were killed by security forces. The attack was planned by a militant called Adil, Mr Saleh announced on his Facebook page, giving only one name of the arrested man. Adil had been an undergraduate student in the Islamic law faculty of the university. He left his studies to join the Haqqani militant group and later planned the attack under the command of an experienced member of the group, Mr Saleh said. "Adil had been missing for three years amid rumours that he had gone to receive training in war and fighting." The former student hailed from the province of Panjshir but his family lived on the outskirts of Kabul. During questioning, he revealed that he had received weapons from Haqqani network to carry out the attack, Mr Saleh said. The attacker’s motivation was to “undermine and defame the government and to make it look weak and ineffective in the minds of people,” he said. The Haqqani network is an affiliate of the Taliban insurgent group, which has been holding peace talks with the Afghan government in Qatar. The Taliban denied carrying out the university attack, which was later claimed by ISIS. ISIS also claimed to have carried out a suicide bombing near an educational centre in western Kabul days before the university attack. Twenty-four people were killed in that attack. The Taliban and ISIS are rivals in Afghanistan, but the national intelligence agency announced in May that security forces had arrested eight members of a network grouping ISIS and Haqqani militants that was responsible for bloody attacks in the capital. The attack on the university came months after the intelligence agency, the National Directorate of Security, said it had arrested three of its teachers for being ISIS recruiters. "Teachers and religious scholars who support jihadist groups hold a lot of influence over the community," a security official close to the investigation told <em>The National </em>after the arrests in July. "Young students in their care are exposed to harmful ideologies when they are extremely vulnerable and can be manipulated to do something wrong."