During World War II, the Iraqi regime of Regent 'Abd al-Ilah was overthrown in 1941 by the Golden Square officers, headed by Rashid Ali. The short-lived pro-Nazi government of Iraq was defeated in May 1941 by the allied forces in the Anglo-Iraqi War. Iraq was later used as a base for allied attacks on the Vichy-French-held Mandate of Syria and support for the Anglo-Soviet invasion of Iran. At the same time, the Kurdish leader Mustafa Barzani led a rebellion against the central government in Baghdad. After the failure of the uprising Barzani and his followers fled to the Soviet Union.
In 1945, during the final stages of World War II, Iraq joined the United Nations and became a founding member of the Arab League. In 1948, massive violent protests, known as the Al-Wathbah uprising broke out across Baghdad as a popular demand against the government treaty with the British, and with communist party support. More protests continued in spring, but were interrupted in May, with the martial law, when Iraq entered the 1948 Arab-Israeli War along with other members of the Arab League.
In February 1958, King Hussein of Jordan and `Abd al-Ilāh proposed a union of Hāshimite monarchies to counter the recently formed Egyptian-Syrian union. The resulting Arab Federation, formed on 14 February 1958 was short-lived. It ended in 1958, when the monarchy was overthrown in a military coup, led by Abd al-Karim Qasim.
The territory of Iraq was under Ottoman dominance until the end of World War I, becoming an occupied territory under British military from 1918. In order to transform the region to civil rule, Mandatory Mesopotamia was proposed as a League of Nations Class A mandate under Article 22 and entrusted to Britain, when the former territories Ottoman Empire were divided in August 1920 by the Treaty of Sèvres. However, the 1920 Iraqi revolt resulted in the scrapping of the original mandate plan in favor of British administered semi-independent kingdom, under the Hashemite allies of Britain, via the Anglo-Iraqi Treaty.
Faisal ibn Husayn, who had previously been proclaimed King of Syria by a Syrian National Congress in Damascus in March 1920, was ejected by the French in July of the same year. Faisal was then granted the territory of Iraq, to rule it as a protected kingdom, with the British RAF retaining certain military control, though de facto, the territory remained under British administration until 1932.