Masqaṭ
Muscat lies in a small bay on the Gulf of Oman, enclosed on its landward side by bare mountains. Its harbour offered ships shelter, although its opening to the north exposed them to winter winds. The steep country around the town limited cultivation and made access to the interior difficult. Under the kings of Hormuz, Muscat emerged as a port where goods moving between Iran and India could be transferred from one ship to another.
In 1507 Afonso de Albuquerque's Portuguese fleet sacked and burned the town. The Portuguese established a garrison and trading post, and strengthened its defences with the forts known as al-Mirani and al-Jalali. Ottoman fleets attacked the port several times in the sixteenth century. The Portuguese held Muscat until 1650, when the forces of the Yaruba imam Sultan bin Saif recovered it. Omani maritime power subsequently reached down the East African coast, while Muscat became a centre of its Indian Ocean trade.
In the eighteenth century Ahmad ibn Said drove out Persian invaders and established a new ruling dynasty. Relations with Britain grew after a treaty of friendship in 1798; Omani rulers also maintained connections with France and the Netherlands. Under Sayyid Said, the realm's interests on the African coast drew the ruler across the ocean, and in 1832 he transferred his capital to Zanzibar. Muscat remained an important Omani port in a maritime world extending far beyond its rocky bay.