Alexandria was founded around a small pharaonic town c. 331 BC by Alexander the Great. It remained Egypt's capital for nearly a thousand years, until the Muslim conquest of Egypt in AD 641, when a new capital was founded at Fustat (later absorbed into Cairo). Ancient Alexandria was best known for the Lighthouse of Alexandria (Pharos), one of the Seven Wonders of the Ancient World; its library (the largest in the ancient world; now replaced by a modern one); and the Catacombs of Kom el Shoqafa, one of the Seven Wonders of the Middle Ages. Ongoing maritime archaeology in the harbor of Alexandria, which began in 1994, is revealing details of Alexandria both before the arrival of Alexander, when a city named Rhacotis existed there, and during the Ptolemaic dynasty.
From the late 19th century, Alexandria became a major center of the international shipping industry and one of the most important trading centers in the world, both because it profited from the easy overland connection between the Mediterranean Sea and the Red Sea, and the lucrative trade in Egyptian cotton.