Madrasas are the only education available to millions of poor children in Pakistan.

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.

Modernising madrasa education is a thorny issue in Pakistan, a nation where religious schools are often blamed for radicalisation 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," spokesman Gen. Asif Ghafoor told reporters at the 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 educations 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.