After spending eight years as a teacher of civil law at the Faculty of Law in Cairo, al-Sanhūrī moved to Baghdad in 1935, where he became dean of the Baghdad School of Law. In February 1936, Rashid Ali al-Gaylani, then the Minister of Interior, put together a committee of jurists for the drafting of an Iraqi Civil Code, which he tasked al-Sanhūrī with presiding over. Interruptions brought about by the 1936 Iraqi coup d'état and strong opposition from Islamists brought the project to a halt. In 1937, al-Sanhūrī returned to Cairo. Around this time, he interacted with secessionists of the Wafd Party and joined the Saadist Institutional Party.