Until 1872, when it became part of the Ottoman Empire, Qatar was under the influence of the Khalifa family of Bahrain. Upon the withdrawal of Turkish forces in the early days of the First World War, Qatar came under the stewardship of Britain with whom it signed a treaty in 1916. The recognition of Sheikh Abdullah al-Thani by the British as the emir of Qatar established the al-Thani family as the ruling dynasty in Qatar, a position that they continue to hold to this day.
The 19th and early 20th century witnessed the domination of the Persian Gulf by Britain. Through a series of agreements, Britain was able to extend protectorate status to most Gulf countries including Qatar. The 1916 Anglo-Qatari, agreement and a later agreement signed in 1923, committed Britain to the defense of Qatar while Qatar agreed not to enter into any agreements with foreign governments without British consent.
Britain's decision to withdraw from all areas east of the Suez by 1971 brought independence to Qatar and other Persian Gulf nations. After the failure of talks on a proposed federation with Bahrain, Qatar became fully independent on 1 September 1971. Anticipating independence, Qatar adopted a written Constitution in April 1970. The emir is the head of state, and he also holds the positions of minister of defense and commander-in-chief of the armed forces. He also appoints the Council of Ministers. The appointed Advisory Council has limited powers and assists the emir in ruling the country, but it has no independent legislative powers. The ruling al-Thani family dominates both the Advisory Council and the Council of Ministers in addition to other important economic and political institutions.