The Omani Invasion:During the beginning of the 18th Century, an Afghan uprising (in  Afghanistan) and subsequent invasion of Persia by the Afghans caused  regional instability which resulted in the Persians pulling out their  garrisons from Bahrain. Taking advantage of the confusion, the Sultanate  of Oman (in 1717), then a regional power in the Gulf, invaded the  island thus lifting 115 years of Safavid control of the island.
The Bahraini cleric, Shaikh Yousif al Bahrani (the cleric I previously  mentioned) provided a detailed account of this invasion in his  autobiography and book:
The earth shook and everything came to a standstill while preparations  were made to do battle with these vile men [the Khārijite Omani invasion  force]. The first year they came to seize it they returned  disappointed, for they were unable to do so. Nor were they able to  succeed the second time a year later, despite the help they received  from all of the Bedouin and outlaws. The third time, however, they were  able to surround Bahrain by controlling the sea, for Bahrain is an  island. In this way they eventually weakened its inhabitants and then  took it by force. It was a horrific battle and a terrible catastrophe,  for all the killing, plunder, pillage, and bloodshed that took place.
After the Khārijites had conquered it and granted the inhabitants safe  passage, the people—especially the notables—fled to al-Qaṭīf  and other regions. Among them was my father—God have mercy upon  him—accompanied by his dependents [i.e., wives] and children, who  traveled with them to al-Qaṭīf. But he  left me in Bahrain in the house we owned in al-Shākhūra because some  chests filled with bundles of our possessions, including books, gold  coins, and clothes, were hidden there. He had taken a large portion of  our possessions up to the fortress in which everyone had planned to  [take refuge] when we were besieged, but he had left some behind in the  house, stored in hiding places. Everything in the fortress was lost  after the Khārijites took it by force, and we all left the fortress with  nothing but the clothes on our backs. So when my father left for al-Qaṭīf,  I remained in Bahrain; he had ordered me to gather whatever books  remained in the fortress and save them from the hands of the Khārijites.  I did manage to save a number of books that I found there along with  some that were left in the house, which I sent to him a few at a time.  These years passed in an utter lack of prosperity.I then traveled to  al-Qaṭīf to visit my father and stayed there two or three months, but my father grew fed up with sitting in al-Qaṭīf  because of the large number of dependents he had with him, the  miserable conditions, and his lack of money, so he grew determined to  return to Bahrain even though it was in the hands of the Khārijites.  Fate, however, intervened between him and his plans, for the Persian  army, along with a large number of Bedouins, arrived at that time to  liberate Bahrain from the hands of the Khārijites. We followed the  events closely and waited to see the outcome of these disasters;  eventually the wheel of fortune turned against the Persians, they were  all killed, and Bahrain was burned. Our house in the village [of  al-Shākhūra] was among those burned.During this time, I was traveling  back and forth to Bahrain in order to take care of the date palms we  owned there and gather the harvest, then returning to al-Qaṭīf  to study. [This continued] until Bahrain was taken from the hands of  the Khārijites by treaty, after a great sum had been paid to their  commander, because of the Persian king's weakness and impotence, and his  empire's decline through bad administration.        
Political Limbo in Bahrain:No clear historical evidence suggests that the Omanis had stayed for a  significant period of time aside from the data above. It is widely  believed that Bahrain had been pillaged by the Omanis simply for wealth.  However, when the Omanis had left, political instability in the island  had led to many invasions by Huwala Bedouins. These were Sunni Arabs who  had migrated to Persia in the early centuries, it also applies vice  versa( Sunni Persians settling in Arabia). Al Bahrani says that these  tribes had 'ruined' Bahrain.
|  | 
| A map (in Arabic) showing the extent of the Omani Empire | 
Almost constant warfare between various Sunni bedouin tribes, the  Kharajite Omanis and then the Persians under Nadir Shah (who had sought  to re-establish Persian dominance in the island) and Karim Khan Zand  laid waste to much of Bahrain, while the high taxes imposed by the  Omanis drove out both the ulema,pearl merchants and the pearl divers .
In 1736, Bahrain had been recaptured by Persia , along with the aid of  the British and the Dutch. But afterwards, it was ruled by the Arabs of  Abu Shahr of the Bushire-based Al Madhkur family but it was indirectly a  vassal state to (then De Facto Shah) Karim Khan of the Safavids.
The years of almost constant warfare and instability in the period  led to a demographic collapse - German geographer and Arabist Carsten  Niebuhr found in 1763 that Bahrain's 360 towns and villages had, through  warfare and economic distress, been reduced to only 60.The influence of  Iran was further undermined at the end of the 18th century when the  ideological power struggle between the Akhbari-Usuli strands culminated  in victory for the Akhbaris in Bahrain (Bet you thought they all died out :P )