Beginning in the 16th century, it also began acquiring possessions following series of wars in coastal North Africa.
After Mehmed II (the Conqueror) united most of Anatolia under Ottoman rule, the two empires became neighbours of each other where two Mamluk vassals of Turkmen origin were the buffer states between the two.
After this battle Uluç Ali Reis of the Ottoman Empire captured the city for the second time in 1569 during the reign of Selim II.
Finally in 1574, an Ottoman navy commanded by the grand admiral Sinan Pasha captured the city for the third time.
[6] After Knights Hospitaller left the island of Rhodes in 1522, some of them had settled in Tripoli, the most important city of Libya.
Özdemir Pasha, the deputy of the admiral, conquered the west bank of the Red Sea (roughly corresponding to a narrow coastal strip of Sudan and Eritrea) in 1567, during the reign of Selim II.
The Ottomans, led by Hassan Pasha, suffered a major defeat at the hands of the Saadi Sultan Abdallah al-Ghalib in Wadi al-Laban.
The main Ottoman army was preoccupied in European fronts and the only defenders were local forces which were routed in the Battle of Pyramids.
The Ottoman Empire lost direct control of Egypt and the lands to the south during the revolt of Kavalalı Mehmet Ali Pasha in the 1830s.