After the assassination of Julius Caesar in 44 BC, the Ptolemaic Kingdom (), which had ruled Egypt since the Wars of Alexander the Great brought an end to Achaemenid Egypt (the Thirty-first Dynasty), took the side of Mark Antony in the last war of the Roman Republic, against the eventual victor Octavian, who as Augustus became the first Roman emperor in 27 BC, having defeated Mark Antony and the pharaoh, Cleopatra VII, at the naval Battle of Actium. After the deaths of Antony and Cleopatra, the Roman Republic annexed the Ptolemaic Kingdom of Egypt. Augustus and many subsequent emperors ruled Egypt as the Roman pharaohs. The Ptolemaic institutions were dismantled, and though some bureaucratic elements were maintained the government administration was wholly reformed along with the social structure. The Graeco-Egyptian legal system of the Hellenistic period continued in use, but within the bounds of Roman law. The tetradrachm coinage minted at the Ptolemaic capital of Alexandria continued to be the currency of an increasingly monetized economy, but its value was made equal to the Roman "denarius." The priesthoods of the Ancient Egyptian deities and Hellenistic religions of Egypt kept most of their temples and privileges, and in turn the priests also served the Roman imperial cult of the deified emperors and their families.