During the Mandate of Iraq (1920–32), the British advisors in Iraq were able to keep the waterway binational under the thalweg principle that worked in Europe: the dividing line was a line drawn between the deepest points along the stream bed. In 1937, Iran and Iraq signed a treaty that settled the dispute over control of the Shatt al-Arab. The 1937 treaty recognized the Iranian-Iraqi border as along the low-water mark on the eastern side of the Shatt al-Arab except at Abadan and Khorramshahr where the frontier ran along the "thalweg" (the deep water line) which gave Iraq control of almost the entire waterway; provided that all ships using the Shatt al-Arab fly the Iraqi flag and have an Iraqi pilot, and required Iran to pay tolls to Iraq whenever its ships used the Shatt al-Arab. Shah Reza Khan of Iran together with his close friend President Mustafa Kemal Atatürk of Turkey had been promoting the Saadabad pact intended to protect the neutrality of Muslim nations if the world should be plunged into war again. In return for the Shatt al-Arab treaty, Iraq joined the Saadabad pact and Iranian-Iraqi relations were friendly for decades afterward. The Saadabad pact ultimately brought together Turkey, Iraq, Iran and Afghanistan in an alliance intended to protect their neutrality. In 1955, both Iran and Iraq were founding members of the Baghdad Pact alliance.