Bahrain (sometimes transliterated Bahrayn) is apparently made up of a total of 33 islands. The main one is thought to have come loose from the Arabian peninsula around 6000 B.C.E. The island is thought to have been inhabited by humans since about that time. The Dilmun civilization came to prominence around 3000 B.C.E., lasting for about 2000 years after that. Under their influence, Bahrain was the center of a large trade network that depended on trade routes from Mesopotamia to India. The greenery of the island gave it a reputation for sacredness in Sumerian mythology at about this time. When the Indus river valley civilization declined around 1700 B.C.E. or so Bahrain's Dilmun civilization underwent a corresponding decline.
Bahrain fell into obscurity for a time after that. They were made the vassals of the Assyrians in the 9th century B.C.E. and were incorporated into the Babylonian empire 200 years later. For a long time, nothing happened, until Alexander the Great's general Nearchus explored the Persian Gulf in the late 4th century B.C.E. He established a colony on the island of Falaika off the coast of Kuwait and explored the rest of the Bahrain archipelago, naming it Tylos. This name stuck with the area for some time.
For about six hundred years after that, Bahrain prospered under the patronage of the rising Persian powers to the north. They remained theoretically independent from them, though, until the 4th century C.E., when the Sasanians formally annexed the archipelago. Nestorian Christianity grew in popularity in Bahrain during these years, and was firmly established by the 5th century.
In 640, Mohammed wrote a letter to the ruler of Bahrain inviting him to accept Islam. His offer was accepted, and Bahrain became one of the first places outside mainland Arabia to adopt Islam. Christianity still survived after that, although adherents had to pay a poll tax under the rule of the Umayyads and the Abbasids. Those two caliphates ruled the Islamic world, including Bahrain, for quite some time. They exerted direct influence over the area from the 9th to 11th centuries (although the Qarmatians of east Arabia did break away with Bahrain in the 10th century), and during this time Bahrain became increasingly Shiite, again in keeping with Persian precedent.
The economy was pretty good during these times, and Bahrain again swelled in trade importance on the routes from Iraq to India. Bahrain changed hands quite a bit after the power of the caliphs lapsed, with petty shieks conquering it from one another fairly often. In 1485, the Portugese landed on Bahrain, taking with them news of a healthy pearl market. They come to rule the islands by 1521. Under their rule, the Bahrainis were able to expel the Portugese from the Persian Gulf in 1602. With that having been done, the rulers of Bahrain appealed to Persia for protection and again came under Persian control.
The Al-Khalifa family, strongmen from Kuwait, expelled the Persians from the islands in 1783 and retain control over the archipelago to this day. In 1820, Britain pressured Bahrain into signing a treaty under which Britain would protect Bahrain from Ottoman aggression in exchange for easy access to the Persian gulf. This led to a second treaty in 1861 that turned Bahrain into a British protectorate and allowed the British to install a pet Emir of their own in 1869, but otherwise things went well until the 1930's. The world pearl market collapsed then, partially due to Japanese manufacture of cultured pearls and partially due to the worldwide depression. Thankfully for Bahrain, oil was discovered in 1932, giving the country the economic strength to maintain the strong economy it had had with the pearl trade. They joined the Trucial States and Qatar in the Federation of Arab Emirates at about this time, too.
Bahrain was the first gulf state to discover oil. Quality of education increased markedly, as did health care. Of course, Bahrain is a small nation and its oil reserves are proportional. Its relatively low production by later standards has allowed it to adapt its culture more slowly to economic success, easing its way rather than booming.
In spite of waves of Arab nationalism that flared anti-British sentiment in the 1950's, Bahrain remained a protectorate of Great Britain until 1968. In 1971, Isa bin Salman Al Khalifa became the first Emir and prime minister, deciding not to join the United Arab Emirates on his accession to power. The constitution was adopted in 1973. In 1975, he dissolved the Parliament under charges of obstructing governmental activities but the state remained stable. It wasn't for lack of challenges, though; in 1979 the Iranian revolution caused the Shiite majority to question the legitimacy of the Sunni state, and Iran voiced a claim to the islands at that time, as well. A causeway linking Bahrain to the mainland opened in Decmeber 1986. Bahrain joined with the U.S. coalition to expel Iraq from Kuwait in 1990.
The rest of the 90's brought a lot of unrest in Bahrain. 1993 saw an attempt by the Al-Khalifas to reform slightly with their formation of the Consultative Council to replace the legislature that had been dissolved earlier. No one liked that, though, since all the members were apointed by the Emir. Shaykh Ali Salman, leader of a Shiite resistance movment, was arrested in December 1994, sparking a movement in favor of a national assembly. These actions were met with extensive governmental arrests. A few political prisoners were released in September 1995, but no agreement had really been reached between the two sides. November brought student riots and one of the chief prisoners that had been released, Shi'i leader Shaykh Amir al-Jamri, was rearrested in January of the next year. This was closely followed by two bombings in February of 1996. Isa bin Salman Al Khalifa managed to retain power, despite the unrest under his rule, and died of natural causes on March 6, 1999 and his son Hamad bin Isa al-Khalifa ascended to the throne smoothly.