The Ottoman Turks temporarily captured Muscat from the Portuguese again in 1581 and held it until 1588. During the 17th century, the Omanis were reunited by the Yaruba Imams. Nasir bin Murshid became the first Yaarubah Imam in 1624, when he was elected in Rustaq. Nasir's energy and perseverance is believed to have earned him the election. Imam Nasir and his successor succeeded in the 1650s in expelling the Portuguese from their coastal domains in Oman. The Omanis over time established a maritime empire that pursued the Portuguese and expelled them from all their possessions in East Africa north of Mozambique, which were then incorporated into the Omani domains. To capture Zanzibar Saif bin Sultan, the Imam of Oman, pressed down the Swahili Coast. A major obstacle to his progress was Fort Jesus, housing the garrison of a Portuguese settlement at Mombasa. After a two-year siege, the fort fell to Imam Saif bin Sultan in 1698. Thereafter the Omanis easily ejected the Portuguese from other African coastal regions including Kilwa and Pemba. Saif bin Sultan occupied Bahrain in 1700. Qeshm was captured in 1720. The rivalry within the house of Yaruba over power after the death of Imam Sultan in 1718 weakened the dynasty. With the power of the Yaruba Dynasty dwindling, Imam Saif bin Sultan II eventually asked for help against his rivals from Nader Shah of Persia. A Persian force arrived in March 1737 to aid Saif. From their base at Julfar, the Persian forces eventually rebelled against the Yaruba in 1743. The Persian empire then tried to take possession of the coast of Oman until 1747.