During World War II, Shawkat served as Minister of Jutice in the pro-Axis government of Rashid Ali al-Kaylani. On July 3, 1940, he was sent on a secret mission to Ankara to meet with Franz von Papen, then serving as the German ambassador to Turkey, to negotiate the renewal of ties between the Nazi regime and Iraq and promising to provide military support to Germany when its armies reached the Middle East. This meeting laid the groundwork for further meetings between representatives of Kaylani's government and the Nazis, which eventually resulted in the British invasion of Iraq through Basra in May 1941. With the reestablishment of a pro-Western government in Iraq, Shawkat's political career came to an end.