Kléber engaged in negotiations with both the English and Ottomans, with the aim of honourably evacuating the remains of the French force from Egypt to take part in operations in Europe. An accord (the convention of El Arich) was concluded on 23 January 1800 allowing such a return to France, but it proved impossible to apply due to internal dissensions among the English and the dithering of the Sultan, and so the conflict in Egypt restarted.
Kléber was betrayed by the English Admiral Keith, who did not respect the El Arich convention. Kléber restarted hostilities, for he refused to surrender. The English and the Ottomans believed the armée d'Orient was now too weak to resist them, and so Yussuf Pasha marched on Cairo, where the local population obeyed his call to rise up.
Kleber led the outnumbered French troops to attack the Ottoman army at Heliopolis, decisively winning the battle and enabling them to re-enter Cairo and bring an end to the revolt.