As Muslim institutions of higher learning, the madrasa had the legal designation of waqf.