Afghan forces have captured the mastermind of two brutal attacks on education institutes in the country's capital which killed nearly 50 people, officials said Saturday.
Mohammad Adel planned an attack on his alma mater Kabul University on November 2 and a bombing at another education centre in October, officials said.
At least 22 people were killed and another 27 wounded when three gunmen rampaged through Kabul University, spraying classrooms with bullets for several hours.
The brazen daylight assault came just days after 24 people were killed when a suicide bomber blew himself up near the Kawsar-e Danish education centre in the capital, which offered training and higher-education courses.
The attacks came amid surging violence across the country that has only worsened in recent months despite the government holding peace talks with the Taliban in Qatar.
Afghanistan's intelligence agency, the National Directorate of Security (NDS), said: "NDS special forces have detained Mohammad Adel, the main mastermind of Kabul University and Kawsar education centre, in a targeted operation in Kabul."
It did not say when Adel was captured.
Security sources said he was a former student of Kabul University.
During his interrogation, Adel told NDS officers that it was he who proposed the university attack as it "would get wide coverage and put pressure on the government", the NDS said.
It did not reveal details on how Adel planned the other attack.
Earlier on Saturday, Vice President Amrullah Saleh had also said Adel masterminded the university attack.
He said Adel was recruited by the Haqqani network, an affiliate of the Taliban.
"The attack was carried out to pressure, defame and make the government look weak in front of the people," Saleh said.
Saleh said that Adel -- who had studied the Islamic sharia law and hailed from the province of Panjshir -- had revealed that he received weapons from the Haqqani network to carry out the attack.
The shadowy group has long been accused of carrying out brutal assaults on Western forces and civilians, and has been branded a terrorist group by Washington.
Soon after the university attack, Saleh and other top officials had blamed the Taliban.
However, both attacks were claimed by the Islamic State group.