In Mesopotamian cities, for instance, social class was often based on land tenure and mercantile wealth. Temples doubled as city banks and factories. Their gods might only leave the temple grounds on festive occasions, but priests moved in broader circles, making interest-bearing loans to traders, watching over armies of female weavers and jealously guarding their fields and flocks. There were powerful societies of merchants.