This article discusses Islamic education policies in Indonesia during the pre-independence period with a specific focus on pesantrens as centers of education and resistance against colonialism. Dutch colonial government policies tended to neglect and suppress Islamic education, which motivated pesantrens to uphold their existence. Pesantrens not only taught religious knowledge but also general sciences, shaping national character and identity, and producing many national movement figures. The article also explores the history of pesantrens, their contribution to the independence struggle, and their conditions under Dutch and Japanese occupations. Despite facing various challenges and pressures, pesantrens remained independent educational institutions that significantly contributed to shaping a nationalist and religiously-minded younger generation.