Julius Caesar left Rome for Alexandria in 48 BC in order to quell the looming civil war, as war in Egypt, which was one of Rome's greatest suppliers of grain and other expensive goods, would have had a detrimental effect on trade with Rome, especially on Rome's working-class citizens. During his stay in the Alexandrian palace, he received 22-year-old Cleopatra, allegedly carried to him in secret wrapped in a carpet. Caesar agreed to support Cleopatra's claim to the throne. Ptolemy XIII and his advisors fled the palace, turning the Egyptian forces loyal to the throne against Caesar and Cleopatra, who barricaded themselves in the palace complex until Roman reinforcements could arrive to combat the rebellion, known afterward as the battles in Alexandria. Ptolemy XIII's forces were ultimately defeated at the Battle of the Nile and the king was killed in the conflict, reportedly drowning in the Nile while attempting to flee with his remaining army.