France invaded the nominally Ottoman-ruled Egypt in 1798 with an army led by Napoleon Bonaparte. Initially successful in taking control of key cities, an expedition to Syria led to defeat and Napoleon returned to France after successfully defeating Ottoman force at the Battle of Abukir in July 1799. Napoleon left command of the French forces in the hands of Jean-Baptiste Kléber. The army was in a poor position, threatened by Ottoman force under Kör Yusuf Ziyaüddin Pasha advancing from Syria and Kléber's troops were near to mutiny following their abandonment by Napoleon.