On 15 August 1971, Bahrain declared independence and signed a new treaty of friendship with the United Kingdom. Bahrain joined the United Nations and the Arab League later in the year. The oil boom of the 1970s benefited Bahrain greatly, although the subsequent downturn hurt the economy. The country had already begun diversification of its economy and benefited further from the 1970s Lebanese Civil War, when Bahrain replaced Beirut as the Middle East's financial hub after Lebanon's large banking sector was driven out of the country by the war.
Following the 1979 Islamic revolution in Iran, in 1981 Bahraini Shī'a fundamentalists orchestrated a failed coup attempt under the auspices of a front organisation, the Islamic Front for the Liberation of Bahrain. The coup would have installed a Shī'a cleric exiled in Iran, Hujjatu l-Islām Hādī al-Mudarrisī, as supreme leader heading a theocratic government. In 1994, a wave of rioting by disaffected Shīa Islamists was sparked by women's participation in a sporting event.
The 1990s Uprising in Bahrain occurred in Bahrain between 1994 and 2000 in which leftists, liberals and Islamists joined forces. The event resulted in approximately forty deaths and ended after Hamad ibn Isa Al Khalifa became the Emir of Bahrain in 1999. A referendum on 14–15 February 2001 massively supported the National Action Charter. He instituted elections for parliament, gave women the right to vote, and released all political prisoners. As part of the adoption of the National Action Charter on 14 February 2002, Bahrain changed its formal name from the State (dawla) of Bahrain to the Kingdom of Bahrain.
The country participated in military action against the Taliban in October 2001 by deploying a frigate in the Arabian Sea for rescue and humanitarian operations. As a result, in November of that year, US president George W. Bush's administration designated Bahrain as a "major non-NATO ally"