Before 1498 the Indian Ocean had no naval empires. Spices moved from India and Southeast Asia through Muslim hands to the Red Sea and Persian Gulf, then overland to Cairo, Alexandria, and Venice. When Vasco da Gama reached Calicut, the Portuguese set out to redirect that trade around Africa and to tax what remained. Their tools were ship-mounted cannon, fortified ports, and the cartaz, a pass that all other ships were required to buy.
The states that lived on the old route struck back. The Mamluk Sultanate of Egypt of Egypt, with timber and gunners supplied through Ottoman and Venetian channels, sent a fleet that joined ships from Gujarat and Calicut. After an initial success it was destroyed at the Battle of Diu in 1509. Afonso de Albuquerque then seized Goa (1510), Malacca (1511), and Hormuz (1515), though he failed to take Aden and so never closed the Red Sea.
The Ottoman Empire inherited the struggle after conquering Egypt in 1517. Ottoman fleets from Suez took Aden and Yemen, besieged Portuguese Diu in 1538 alongside Gujarati forces, raided Muscat and Hormuz in the 1550s, and sent cannon and gunners to the sultanate of Aceh in Sumatra, which repeatedly attacked Portuguese Malacca. Neither side won. The Ottomans kept the Red Sea and the Portuguese kept their forts, and by mid-century the spice trade through Egypt had recovered to something like its old volume.
In the seventeenth century the Portuguese position crumbled under attack from several directions. The Safavid Empire under Shah Abbas I, aided by English ships, took Hormuz in 1622; the Dutch East India Company (VOC) captured Malacca in 1641; and the Omani Maritime Empire took Muscat in 1650 and Mombasa in 1698.
The rivalry shows the CED's point that competition over trade routes led to conflict between states. It also shows the limits of European power before 1750: Portugal introduced armed trade to the Indian Ocean but never monopolized it.