Among the approximately three million Afghan refugees in Pakistan, thousands of children were educated in madrasa boarding schools financed by aid from the US and Gulf monarchies. Since that aid was distributed according to the conservative Islamist ideological criteria of Pakistan's President Muhammad Zia-ul-Haq and Saudi Arabia (and ignoring native Afghan traditions), the schools were part of networks of the favored Hizb-e-Islami party and the Pakistan Deobandi. (Iran provided similar help to Shia Islamist groups and punishments to moderate Shia nationalist Afghans.)