In 1839, the Ottoman Empire moved to reoccupy lands lost to Muhammad Ali in the First Turko-Egyptian War. The Ottoman Empire invaded Syria, but after suffering a defeat at the Battle of Nezib appeared on the verge of collapse. On 1 July, the Ottoman fleet sailed to Alexandria and surrendered to Muhammad Ali. Britain, Austria and other European nations, rushed to intervene and force Egypt into accepting a peace treaty. From September to November 1840, a combined naval fleet, made up of British and Austrian vessels, cut off Ibrahim's sea communications with Egypt, followed by the occupation of Beirut and Acre by the British. On 27 November 1840, the Convention of Alexandria took place. British Admiral Charles Napier reached an agreement with the Egyptian government, where the latter abandoned its claims to Syria and returned the Ottoman fleet in exchange of the recognition of Muhammad Ali and his sons as the only legitimate rulers of Egypt.[4][5]