In 2007 Pakistan announced a plan to register and regulate the 13,000 madrassas (religious schools) operating within its borders. Most agreed to be registered but the 500 or so that resisted contained most of those that were heavily into training Islamic radicals and terrorists. Religious schools are popular because they are free, and most teach secular subjects as well. Only about half of Pakistanis are literate, and most parents realize that education is a way out of poverty. The government quietly dropped the 2007 registration program because of political pressure from Islamic conservative political parties and more ominous threats from the ISI (Pakistani CIA).
The registration plan was announced by a military government because even the generals were appalled at the growing threat from Islamic terrorists based in Pakistan. This was the result of realization that the main source of Pakistani Islamic terrorists was from these religious schools, or at least some of them.
Since the 1990s the majority of the Islamic terrorists (gunmen, suicide bombers, helpers of all sorts) came from madrassas (Islamic schools). Such schools are found all over the Islamic world, but the ones that produce the most terrorists are those that teach a conservative form of Islam, usually one that justifies militant Islam, hatred of non-Moslems and a favorable attitude towards Islamic radicalism. There are probably fewer than five million kids attending these conservative madrassas. But these schools turn out thousands of potential terrorists each year.
An extensive study of the madrassas in Pakistan found that only about 1-2 percent of Pakistani children were attending the religious schools. Most of the Islamic schools were concentrated in the Pushtun (tribal) areas, where they attracted as much as ten percent in some districts. Earlier nationwide estimates ranged from 10-33 percent. The madrasses tend to teach a conservative version of Islam and stress the need to fight infidels (non-Moslems), but they also teach basic literacy and some math. Since most Islamic states have terrible educations systems, parents see madrassas as a viable, often only option.
There are currently 35,000 madrassas in Pakistan, a country where you still have over 30 percent of the children unable to attend school. The national literacy rate is 50 percent. It's lower in Afghanistan. The Gulf States only got high literacy rates in the last few generations, courtesy of all that oil money. Saudi Arabia and Iraq have achieved literacy rates close to 80 percent. But Pakistan and Afghanistan haven't got that wealth. Then again, neither does China, which has a literacy rate of 90 percent (as do most of the East Asian nations). It's a culture thing, which is not politically correct to even mention.
Even children going to state schools in Islamic nations, will get a lot of religious instruction. Parents who can afford it, send their kids to "Western" schools that teach subjects that will help the children get ahead in life. For Moslem nations, students are encouraged to study religion, even in college. While many Moslem kids realize that studying technical subjects will do them more good, at least economically, the Islamic nations turn out fewer technically trained graduates, per capita, than in the West.
This attitude towards secular education has left most Islamic nations illiterate, poor and incubators of terrorism. Trying to change that, brings out the wrath of the Islamic clergy, who insist that the best education is a religious one, and no education at all is best for girls.
When Pakistan was created in 1947 there were only 300 madrassas and that number did not increase much until the 1970s when it grew to nearly 3,000 because the military decided that a large force of Islamic terrorists would be a useful, deniable and relatively safe (for Pakistan) weapon to use against India. Several wars with India since 1947 showed that Pakistan could not match India when it came to military power. The Islamic terrorists were to help deal with that. The Islamic terror gambit failed but it created a monster that grew larger and uncontrollable. As of 2016 nearly four million students were studying in Pakistani madrassas. Saudi Arabian cash (government and private) is received by about 65 percent of Pakistani madrassas. Most of these madrassas do not teach the violently anti-infidel (non-Moslem) ideas so common in Saudi schools, but a few percent of Pakistani madrassas do and all the financial aid to non-radical madrassas makes it difficult for the recipients to criticize Saudi Arabia or the form of Islam the Saudis favor.
Unregistered madrassas in Pakistan are still left alone and are still the source of radicalized students as well as bases for some Islamic terrorist organizations. Efforts to change that have so far failed because decades of government support for Islamic terrorism has created a large minority of Pakistanis who oppose a crackdown on the mosques and schools that support Islamic radicalism.