Brief history
For most of its recorded history, Qatar has been dominated by the Al-Thani family, who arrived in the mid-18th century, when Qatar was already well established as a pearling centre. They became the peninsula's rulers about 100 years later and all activity was centered in north-west that was controlled by the Al-Khalifa family (this family nowadays rules Bahrain). Since that time, and even into the present day, tension between the Al-Khalifa and the Al-Thani has been a constant feature of Qatar's history. Qatar's first Al-Thani emir established his capital at Doha in the mid-19th century. To strengthen his position he signed a treaty with Britain in 1867. In 1872 the emir signed a treaty with the Turks allowing them to place a garrison in Doha but it was forced to withdraw from Qatar in 1915, after Turkey entered WWI on the side of Germany.
After expelling the Turks, Qatar's emir signed an exclusive agreement with the British in 1916, under which Britain guaranteed Qatar's protection in exchange for a promise that the ruler would not have any dealings with other foreign powers without British permission. The first oil prospectors who arrived in the early 1930s were warm welcomed and oil was first struck in 1939. Because of WWII, however, production did not begin for another 10 years and from that point on things began to change very quickly.
When the British announced that they would leave the region by the end of 1971, Qatar entered talks with Bahrain and the Trucial States (now the United Arab Emirates) with the intention of forming a confederation. After Bahrain pulled out of the talks, Qatar followed almost immediately, declaring independence on 1 September 1971.
Since independence, Qatar has retained its close defense ties with Britain and has increased defense cooperation with both the US and France. For many years Qatar's foreign policy followed the lead of Saudi Arabia, but in the 1990s that began to change. seeking closer ties with Iran. In 1993 Qatar became the first Gulf country to have open diplomatic contact with Israel and throughout the years Qatar managed to maintain diplomatic relations with Israel, as well as Iran and Iraq.
Source Lonely Planet