What was the political situation like between the Ottomans, Portuguese, and Safavids?
I recently read the Ottoman Age of Exploration, which often focuses on the Ottoman conflict with Portugal. The book also references the Ottoman wars with the Safavids, and seems to imply that the Portuguese and Safavids may have had some sort of accord.
But I recently read that the Safavids warred with the Portuguese, taking Qeshm and Hormuz from them.
So is there a deeper story here? What were relations like between these powers that all had ports in the Persian gulf?
I also read that the Persians allied with the British in their conquest of Hormuz. How did the entry of Great Britain in this area change things in the Persian Gulf and Indian Ocean?
The Portuguese never had any agreement of any kind with the Safavids, although both had the Ottomans as enemies. The portuguese arrived in Hormuz in around 1508, and by then the Safavids hadn't yet stretched eastwards. Infact, Hormuz was itself the capital of a small sea-going merchant nation, with holdings around the Persian Gulf, like the Island of Qeshm, which passed on to portuguese control.
By 1622, the situation had changed. The Safavids now directly controlled all the land and islands around Hormuz. Qeshm included since 1610, and the Portuguese had a sort of "tense yet friendly" relations with the Persians, since Hormuz was completely dependent in imported foodstuffs and water from neighbouring lands, now belonging to the persians.
Portuguese presence annyoed the Shah, Abbas, as well as it annoyed the Spanish king in Iberia, now king of Portugal as well, that the island was completely dependant on the persians, so he ordered a fortress to be built on Qeshm. This of course triggered a landslide reaction from the persians who promptly sieged Qeshm fortress, with the help of the british who had then started trading silks with the persians since few years back. If you ask why did the portuguese allow the british to trade there, they didn't. They just didn't want to give any reason to displease the Shah. After a about a year the fortress in Qeshm fell, and with the help of the british, who had better cannon and ships, so did Hormuz.
The portuguese however would simply relocate to Muscat, from which they started such a devastating campaign of terror against the Persian coastline that even the Shah had to come terms with them.
As for the British, they had been promised split control and profits of Hormuz, a promise which wasn't kept. I think they would remain a sort of passive player in the region for a while, coming in every year to trade.