In 1557, the Ottoman Empire invaded Ethiopia and conquered Massawa and other areas along the Red Sea coast. The Ottomans would remain in the area until 1863, when Isma'il Pasha became the Governor of the Egypt Eyalet and declared a Khedivate that was later recognized in 1867. By 1875, Isma'il had expanded his control to Berbera and Harar during the Ethiopian–Egyptian War, but following his deposition by the British and the Ethiopian victory in the war the areas were returned to their control. In 1884, the Bogos in Eritrea were returned to the Ethiopians through liquidations of Egypt by the British and Harar was conquered by Menelik II in 1886.