During and after World War II, the UK reoccupied Iraq due to the 1941 Iraqi coup d'état in which four nationalist Iraqi generals, with German intelligence and military assistance, overthrew Regent 'Abd al-Ilah and Prime Minister Nuri al-Said and installed Rashid Ali as Prime Minister of Iraq. Ali was eventually ousted by the British and 'Abd al-Ilah and al-Said retook power. In 1947, the Iraqis started to negotiate a British withdrawal, and finally negotiated the treaty at Portsmouth on January 15, 1948, which stipulated the creation of a British and Iraqi joint defense board that oversaw Iraqi military planning and British control of Iraqi foreign affairs.