Alexander the Great took over Egypt from the Persians in 331 BC, after the capture of Tyre, and it was while he was there that he founded the city which bears his name. He had first of all gone to the Egyptian city of Memphis, which was the centre of the Persian administration, visiting the site of Alexandria either en route to the oasis sanctuary of Amun at Siwa in the Western Desert, or on his return. The accounts suggest that the idea came to him, as it were, as a result of this trip, and almost by accident, but it seems more logical to suppose that Alexander already intended to found a city for his own political purposes, and that the visit to the future site of Alexandria was deliberate and premeditated.
The site was not uninhabited, and there are traces of massive harbour works there which are certainly earlier than Alexander’s time (how much earlier, and whether they still functioned in 331 BC is disputed). Other Greeks had previously gone to Egypt to visit Amun, whose oracular sanctuary had an established reputation (its visitors included the Spartan commander Lysander), so this part of Egypt was already known in the Greek world. Just how important or sizeable the Egyptian settlement here was, whose name was Rhakotis, must remain uncertain.
From Alexander’s point of view the advantages of this position were the harbour (or, if the ancient harbour works no longer functioned, the potential for the redevelopment of a substantial harbour here) combined with easy access by water to the Nile and the rest of Egypt. It was thus particularly suitable for the commercial exploitation of Egypt, and that seems to have been Alexander’s original intention. It was also something more. During the first half of the fourth century BC the Egyptians had managed, with the aid of Greek commanders and armies, to maintain their independence from Persia, and now clearly regarded Alexander as another liberator.
Alexander, for his part, had no intention other than to incorporate Egypt within his Empire, and the pattern set by his father Philip in asserting control in non-Macedonian areas such as Thrace was to establish Macedonian cities there. Moreover, to gain the support of the Greeks, especially those in Asia who had been liberated from Persia, Alexander had extended the system of alliances formulated by Philip, so that the Greek cities were free and outside direct royal control. Thus any city foundation in Egypt had to be outside the system devised for Egypt itself. A coastal site was essential, and the site chosen for Alexandria ideal. The city was not Alexandria in Egypt, but Alexandria next to Egypt, maintaining the status, however blurred in reality, of separateness. It is unlikely in the extreme that Alexander contemplated other independent or near-independent communities in Egypt. Alexander’s expedition was accompanied by a Macedonian town-planner/architect called Deinocrates, and though Vitruvius tells us that in effect he attached himself to Alexander’s entourage, drawing attention to himself by dressing in a lion skin so that he resembled Herakles, a more sober assessment would be that Alexander took him, as he took other experts with him, knowing that he would need his services.