Alexander the Great besieged Gaza—the last city to resist his conquest on his path to Egypt—for five months, finally capturing it in 332 BCE. Led by a eunuch named Batis and defended by Arab mercenaries, Gaza withstood the siege for two months, until it was overcome by storm. The defenders, mostly local elements, fought to the death and the women and children were taken as captives. The city was resettled by neighboring Bedouins, who were sympathetic to Alexander's rule. He then organized the city into a "polis" or "city-state" and Greek culture took root in Gaza which gained a reputation as a flourishing center of Hellenic learning and philosophy. Belonging at first to the Ptolemaic kingdom, it passed after 200 BCE to the Seleucids.