Napoleon, the leader of the French wars against Britain from the late 1790s until 1815, used the French fleet to convey a large invasion army to Egypt, a major remote province of the Ottoman Empire. British commercial interests represented by the Levant Company had a successful base in Egypt, and indeed the company handled all Egypt's diplomacy. The British responded and sank the French fleet at the Battle of the Nile in 1798, thereby trapping Napoleon's army. Napoleon escaped. The Army he left behind was defeated by the British and the survivors returned to France in 1801. In 1807 when Britain was at war with the Ottomans, the British sent a force to Alexandria, but it was defeated by the Egyptians under Mohammed Ali and withdrew. Britain absorbed the Levant company into the Foreign Office by 1825.