From September 48 BC until January 47 BC, Caesar was besieged in Alexandria, Egypt with about 4,000 men. He was attempting to resolve the Egyptian Civil War between Ptolemy XIII and his sister Cleopatra. When Caesar began to appear to favor Cleopatra over him, Ptolemy was first captured, but then released by Caesar, and gathered his army to besiege the Romans in a small area of Alexandria.