Ganymedes was the tutor of Cleopatra's half-sister and rival, Arsinoë. When civil war broke out between Ptolemy XIII and Cleopatra, Arsinoë sided with Ptolemy, escaping the palace in Ganymedes's company to take command of the army. She executed Achillas, who was the general of the army and Pothinus's co-conspirator in the murder of Pompey, and appointed Ganymedes in his stead. While Achillas besieged Alexandria, Ganymedes' army was in possession of the sources of the river, which gave him control of the canals that provided Alexandria with water, and, by extension, Caesar's water supply. With this in mind, he separated his portion of the river from Caesar's, and engineered machines to fill up Caesar's canals and cisterns with salt water. Several days of increasingly brackish water panicked Caesar's legionaries to the point where Caesar had to deal with the situation personally. Aware that Alexandria was built on limestone, and that limestone was porous, Caesar ordered wells built, restoring the water supply and calming his soldiers. Two days after Caesar frustrated Ganymedes' ploy, the Thirty-Seventh Legion, traveling by sea and also desperately short of water, arrived in Egypt but was unable to land at Alexandria due to contrarywinds. Caesar went out with his fleet to personally attend to the matter but several of his sailors, sent ashore to find water, were captured by Ganymedes' cavalry, who then informed their general of Caesar's location. Marshalling every ship at his disposal, Ganymedes then engaged Caesar in a naval battle, but Caesar prevailed, whereupon the disheartened Alexandrians almost gave up the fight. However, Ganymedes succeeded in rallying them once again, and prepared a larger fleet for another engagement, which this time he was sure he could win. This battle, however, against Caesar's admiral Euphranor, resulted in an even more devastating defeat for Ganymedes. Switching tactics, Ganymedes then focused on bombarding Caesar's forces. This failed to impress Caesar's veterans, although it did result in a stalemate. Afterward, a delegation of Alexandrians petitioned Caesar to return Ptolemy XIII to them, in exchange for Arsinoë, as they had grown weary of Arsinoë and Ganymedes and wished for their King to lead them. Soon, however, Caesar received reinforcements and won the decisive battle. Ganymedes subsequently perished in flight.