Potheinos, judged that this agreement actually favored Cleopatra over Ptolemy XIII and that the latter's army of 20,000, including the Gabiniani, could most likely defeat Caesar's army of 4,000 unsupported troops. He decided to have Achillas lead their forces to Alexandria to attack both Caesar and Cleopatra. The resulting siege of the palace with Caesar and Cleopatra trapped inside lasted into the following year of 47 BC. It included Caesar's burning of ships in the harbor that spread fires and potentially burned down part of the Library of Alexandria. Caesar managed to execute Potheinos after he attempted an assassination plot against him. Arsinoe IV joined forces with Achillas and was declared queen. Soon afterwards, she had her tutor Ganymedes kill Achillas and take his position as commander of her army. Ganymedes then tricked Caesar into requesting the presence of his erstwhile captive Ptolemy XIII as a negotiator, only to have him join the army of Arsinoe IV. With his detailed knowledge of the palace, Ganymedes pumped seawater into the reservoirs via water pipes, but Cleopatra and Caesar countered this by ordering the construction of fresh water wells.