In theory, a waqf could not be shut down by its founder. Once born, it owned itself and had a sovereign status. Think of it as a Muslim version of a nonprofit corporation set up for charitable purposes. Under Muslim law, the waqfs could not be taxed. They collected money from donors and distributed it to the poor, built and ran mosques, operated schools, hospitals, and orphanages, and generally provided the burgeoning upper classes with a means for expressing their religious and charitable urges and to feel good about themselves even while lolling in wealth.