Muscat is enclosed by mountains on the land side. In fact the bay of Muscat extends only a few hundred meters inland. The harbor itself is also partly enclosed with rocks, hence people referred to it as the hidden harbor. This in combination with the favorable water depths made it an ideal natural harbor. It is not surprising that when the Portuguese conquered Muscat in 1507 it was already a very important trading center. Archaeological evidence close to Muscat shows that already thousands of years ago there was "international" trade with the "Indus valley civilization" one of the earliest civilizations on earth. In fact the famous classic Greek geographer Ptolemy mentions a "hidden harbor" in Arabia Felix , which is probably Muscat. The Greek and Romans imported incense from Arabia Felix. A voyage to Arabia Felix is described in the ancient book "Periplus of the Erythraean Sea"
During the first quarter of the 16th century the Portuguese build forts on both sides of the bay. In 1650 the Omani (Ya´ariba) took over control from the Portuguese. As a consequence of struggle between different Omani tribes the Persians gained control of Muscat. Saif bin Sultan II (Ya´ariba) appealed in 1742 / 1743 to the Persians for military help which resulted in the Persians under Nadir Shah taking over most of the country. Ahmad bin Said Al Busaidi, was the governor of Sohar when a Persian fleet attacked the town. He held out for nine months, finally forcing the Persian commander of Nader Shah's army to come to terms and leave the country altogether within a few years. He was elected imam in 1744, marking the last time Oman was occupied by foreign parties and the beginning of a new unified state. It was also the start of a dynasty that has lasted to the present day, making it one of the oldest surviving royal dynasties in Arabia.