Political tension was rising and al-Said was forced to resign. Under pressure from army generals, a coalition government was formed by Rashid Ali al-Gaylani on 18 February 1940. The new government adopted a foreign policy that was less favorable to Britain, and to some extent more sympathetic to Germany. However, al-Gaylani was forced to resign by the regent and al-Said, and a more moderate government was formed by Taha al-Hashimi on 3 February 1941. This government did not last for long, and on 1 April an ultra-nationalist group of army generals overthrew the government in a coup d'état, subsequently forming a military government headed by al-Gaylani. Abd al-Ilah and al-Said both fled Baghdad. Parliament convened and elected Al-Sharif Sharaf to replace Abd al-Ilah as regent. Tensions soon escalated between the al-Gaylani government and the United Kingdom, which led to the Anglo-Iraqi War. British forces occupied Baghdad by the end of May and Abd al-Ilah and al-Said returned to Iraq. Parliament reinstated Abd al-Ilah as a regent. A few months later, al-Said formed a new government, which remained in power until June 1944.