In Seleucid times, Seleucus I Nicator, or one of his successors renamed Gaza into Seleucia to control the surrounding area against the Ptolemies. Greek culture consequently took root and Gaza earned a reputation as a flourishing center of Hellenistic learning and philosophy. During the Third War of the Diadochi, Ptolemy I Soter defeated Demetrius I of Macedon in a battle near Gaza in 312 BCE. In 277 BCE, following Ptolemy II's successful campaign against the Nabataeans the Ptolemaic fortress of Gaza took control of the spice trade with Gerrha and Southern Arabia.