Ptolemy I Soter was a Macedonian general, who eventually became the king of Egypt (323–285 BC). He was a companion and historian of Alexander the Great and later founded the Ptolemaic dynasty, the longest (nearly three hundred years) dynasty established on the Alexandrian empire. The dynasty was, however, crushed by the Romans in 30 BC, and the Ptolemic rule ended with the death of Cleopatra VII. Though he was shrewd and cautious, Ptolemy was reputed for his good conduct and liberality toward the Macedonian soldiers and other Greeks under his service. He was a great patron of arts and literature and founded the 'Great Library' of Alexandria. His Hellenistic kingdom was a center of Greek culture. A writer himself, Ptolemy used the king's daily journal and other official materials to chronicle the glorious history of Alexander and his campaigns. The literary work was later researched and preserved by the Greek historian Arrian's Anabasis. Under his reign, many legal and military organizations and military settlements were set up.