Image copyright AFP Image caption Students after Friday prayers in the madrasa in Jalalabad, Afghanistan
The Al Haramain madrasa was also a source of spiritual guidance for the Afghan Taliban.
The Pakistan-based madrasa’s former head, Mufti Mohammad Ashraf Liaquat, was arrested in 2014 for using it to indoctrinate and train extremist militants to stage attacks on US and Afghan military facilities.
Since then, many questions have been raised about its activities and relationship with the Taliban.
Some also believe that its presence in Afghanistan has had a negative impact on other madrasas and the education of non-Sunni Muslims.
Three years ago, as Afghan security forces made inroads against the Taliban in the southern province of Helmand, the black flag of the terror group had not been seen in the province.
But by the summer of 2015, Taliban militants had returned to the area.
On 28 July, a Taliban suicide bomber struck in the central courthouse of Lashkar Gah, killing dozens and wounding dozens more.
The following month, on 10 August, Taliban militants attacked a school in Helmand town, killing over 150 people – mostly children.
Three days later, another suicide bomber struck in Baghlan province, killing 25.
But by the beginning of November, it was back on the streets of Lashkar Gah.
Image copyright Reuters Image caption Afghanistan’s Ministry of Education said around 80% of the country’s schools are non-existent
Some years back, in the southern Afghan province of Kandahar, an edict from the Taliban’s supreme leader, Mullah Mohammad Omar, prohibited foreign students from attending the Al Haramain madrasa.
But as a show of their disapproval, the militants kept coming. According to a 2009 article by BBC correspondent Gordon Corera, the Taliban took advantage of space in the madrasa’s al-Furqan Institute for young men to seek spiritual guidance and religious lessons.
Image copyright AFP Image caption The army had a close look at the Madrasa near Afghanistan’s border with Pakistan in July 2015
Over the past 20 years, an estimated 200,000 people have studied at the madrasa and the whereabouts of its former students and teachers are unknown.
It is not difficult to find a large number of Taliban in Al Haramain madrasa.
At every Friday prayer, men and women from all backgrounds gather and listen to a number of clerics.
The mosque is then followed by a weekly meet-the-relatives gathering called Dawlat-e-Yammaat, and a Madrassa-month religious camp.
Children of the teachers are also allowed to study at the madrasa.
Sometimes their parents join them.
The Madrasa also provided spiritual guidance to a number of Taliban insurgents over the years, according to interviews with former students of the madrasa who had served in militant ranks.
Image copyright AFP Image caption Former students have accused the madrasa of radicalism
But some former teachers who also served in the Taliban are accusing the Al Haramain madrasa of being “too radical” for teachers.
“The teacher who was a former religious cleric often led prayers that were too long and that reduced his teaching time,” says one former teacher.
“One or two months prior to a major event, the Taliban attack a security installation and the teacher is not seen afterwards in the madrasa, like some of the teachers of Al Haramain,” a former student who graduated from the madrasa in 2009 says.
Only a few former teachers have been allowed to join the madrasa after being rehabilitated by Pakistan.
Saleemullah Jan wants to return. He was a student of the Al Haramain madrasa in 2007, and then worked for its charity arm, Jamatul Ahrar, for two years until it was banned by Pakistani authorities.