Pakistan plans to take control of a network of over 30,000 madrasas as part of a drive to “mainstream” the Islamic schools by bringing them under state control, the military's spokesman said on Monday.

Modernizing madrasa education is a thorny issue in Pakistan, a deeply conservative Muslim nation where religious schools are often blamed for radicalization of youngsters but are the only education available to millions of poor children.

Pakistan's new government, facing pressure from global powers to act against militant groups carrying out attacks in India and Afghanistan, has vowed major reforms and Prime Minister Imran Khan has promised the South Asian nation will no longer tolerate such outfits operating on its territory.

Critics of the madrasa education system say children who attend such schools, where they spend most of the day memorising the holy Quran, are often ill-equipped for the modern world and some madrasas act as breeding grounds for militant outfits.

“The government of Pakistan ... has decided that these madrasas will be mainstreamed,” spokseman Gen. Asif Ghafoor told reporters at military headquarters in the garrison city of Rawalpindi.

“An Islamic education will continue to be provided but there will be no hate speech,” Ghafoor added, saying that religious schools will come under the purview of the ministry of education and incorporate other subjects into their syllabus.

Ghafoor said Pakistan would pay for the madrasas by diverting cash to education from the cost of anti-terrorism security operations, which are less necessary because militant attacks have sharply declined in recent years.

Pakistan has been eager to show that it has severed links with militant groups that have in the past carried out attacks in neighbouring Afghanistan and India.

Last month, the government announced it had taken control of 182 religious schools and detained more than 100 people as part of its biggest push against banned groups.

Security services have kept a close eye on madrasas associated with radicalizing youths and feeding recruits to Islamist militant outfits that have killed tens of thousands of people in the South Asian country since 2000.

“The benefit will be that when children grow and leave these institutions they will have the same career opportunities that those coming from a private school have,” Ghafoor said.

“We want to end violent extremism in Pakistan and that will only happen when our children have the same education and opportunities.”

He added that madrasa legislation would be presented in parliament in another month and that would be followed by a finalised syllabus, appointment of teachers and allocation of finances.