Bahrain has been inhabited for at least 5,000 years. In those early times, it was a trading station for traders who were on their way between the Middle East and India . The territory was ruled at various times by Assyrians, Babylonians, Persians and Arabs who invaded the region and conquered the land. In the 7th century AD, Islam reached the region, which resulted in much of the population converting to the new religion. From then on Bahrain was ruled variously by Caliphs in Syria and Bagdad , then by the Persians again, and later by Omanis until 1541 when the Portuguese invaded. The Portuguese held on to the territory for 80 years until they were expelled by the Iranians who once again ruled it, with some interruptions, until 1783. During this period, the Iranians introduced Shiism as the official religion. In 1783, some Sunni Muslim tribes formed an alliance under Al Khalifa, who invaded Bahrain and became the new ruler. Since then Sunni Muslims from elsewhere in the region were bought in and gradually they became a significant portion of the population (although it is still a minority in the country).
Towards the end of the 18th century, the Saudis tried to exert control over Bahrain , but this was resisted by the British, who by that time had grown in influence in the region. In the mid 19th century, Britain and Bahrain entered into various agreements under which Bahrain would become a British protectorate to ward off threats from both the Saudis and the Ottoman Turks.
In 1932, oil was discovered in Bahrain , which led to even closer political, commercial and military links between Britain and Bahrain . After WW II, the rise of nationalism in the region resulted in political changes and ended in independence of Bahrain from the British in 1971.