Ptolemy XIII (lived 62 BC/61 BC -January 13? 47 BC, reigned 51 BC - January 13?, 47 BC was one of the last members of the Ptolemaic dynasty of Egypt. Son of Pharaoh Ptolemy XII of Egypt he succeeded him in Spring of 51 BC as co-ruler of his older sister Cleopatra VII of Egypt. In October of 50 BC, he was promoted to senior ruler along with her although Potheinus acted as regent for him. In Spring of 48 BC Ptolemy and Potheinus attempted to depose Cleopatra in order for the first to become sole ruler and the second to act as the power behind the throne. They managed to make her flee Alexandria but she soon organized her own army and a civil war begun in Egypt. Soon another sister of theirs started to claim the throne as Arsinoe IV further complicating the situation.
At this point defeated Roman general Pompey came to Egypt seeking refuge from his persuing rival Julius Caesar. Initially Ptolemy and Potheinus pretended to have accepted his request but on September 29, 48 BC, Potheinus himself murdered the general in hopes of winning favor with Caesar when the victorious general arrived. When Caesar did arrive he was presented with the head of his deceased rival and former ally but reportedly instead of being pleased reacted with disgust. Cleopatra proved more successful in winning Caesar's favor and became his lover. Caesar arranged the execution of Potheinus and the official return to the throne of Cleopatra, though she had never officially abdicated, and her marriage to Ptolemy.
Still determined to depose Cleopatra, Ptolemy allied himself with Arsinoe IV and jointly they organized the factions of the army royal to them against those loyal to Cleopatra and the relatively small part of his army that had accompanied Caesar to Egypt. The battle between the warring factions occurred in middle December of 48 BC inside Alexandria itself which suffered serious damage including according to some sources the burning of some of the buildings which consisted the Library of Alexandria. The arrival of Roman reinforcements from Pergamum offered the victory to Caesar and Cleopatra and Ptolemy and Arsinoe had to flee the city. Ptolemy reportedly drowned on January 13, 47 BC while attempting to cross the Nile. Whether he was attempting to further flee or heading towards negotiations remains uncertain in our sources of the time. Cleopatra remained the unquestionable ruler of Egypt although she named their younger brother Ptolemy XIV of Egypt her new co-ruler.