From the late 17th century, the Omani Sultanate was a powerful empire, vying with the Portuguese Empire and the British Empire for influence in the Persian Gulf and Indian Ocean. At its peak in the 19th century, Omani influence or control extended across the Strait of Hormuz to modern-day Iran and Pakistan, and as far south as Zanzibar. When its power declined in the 20th century, the sultanate came under the influence of the United Kingdom. For over 300 years, the relations built between the two empires were based on mutual benefits. The UK recognized Oman's geographical importance as a trading hub that secured their trading lanes in the Persian Gulf and Indian Ocean and protected their empire in the Indian sub-continent. Historically, Muscat was the principal trading port of the Persian Gulf region. Muscat was also among the most important trading ports of the Indian Ocean.