Alexander the Great besieged Gaza, the last city to resist his conquest on his path to Egypt, for five months before finally capturing it 332 BCE; the inhabitants were either killed or taken captive. Alexander brought in local Bedouins to populate Gaza and organized the city into a "polis" (or "city-state").