Britain took the opportunity to ally with the Ottoman Empire in order to repel Napoleon's invasion, intervening militarily during the siege of Acre with Admiral William Sidney Smith in 1799, and under Ralph Abercromby at the Battle of Abukir in 1801. By 1802, the French were completely vanquished in the Middle East.