As Akbar solidified his rule over northern India, and began to extend his power south and west to the coast, he became aware of the new Portuguese presence there. Although the initial Portuguese approach to India had been all guns blazing, they soon realized that they were no match militarily for the Mughal Empire on land. The two powers made treaties, under which the Portuguese were allowed to maintain their coastal forts, in exchange for which the promised not to harass Mughal ships that set out from the west coast carrying pilgrims to Arabia for the hajj.Interestingly, Akbar even formed an alliance with the Catholic Portuguese to punish the Ottoman Empire, which controlled the Arabian Peninsula at that time. The Ottomans were concerned that the huge numbers of pilgrims flooding in to Mecca and Medina each year from the Mughal Empire were overwhelming the resources of the holy cities, so the Ottoman sultan rather firmly requested that Akbar quit sending people on the hajj.
Outraged, Akbar asked his Portuguese allies to attack the Ottoman navy which was blockading the Arabian Peninsula. Unfortunately for him, the Portuguese fleet was completely routed off of Yemen. This signaled the end of the Mughal Portuguese alliance.Akbar maintained more enduring relations with other empires, however. Despite the Mughal capture of Kandahar from the Persian Safavid Empire in 1595, for example, those two dynasties had cordial diplomatic ties throughout Akbars rule. The Mughal Empire was such a rich and important potential trading partner that various European monarchs sent emissaries to Akbar, as well, including Elizabeth I of England and Henry IV of France.