After pursuing his rival Pompey to Egypt, Caesar, recently victorious in a civil war closer to home, became entwined in the Alexandrine civil war after his rival, Pompey Magnus, was killed by King Ptolemy XIII in an attempt to please Caesar.