Although the Kingdom of Egypt was technically "neutral" during World War II, Cairo soon became a major military base for the British and the country was occupied. The British cited the 1936 treaty that allowed it to station troops on Egyptian soil to protect the Suez Canal. In 1941, the Rashīd `Alī al-Gaylānī coup in Iraq led to the British to invade, leading to the Anglo-Iraqi War. This was followed by the Allied invasion of Syria–Lebanon and the Anglo-Soviet invasion of Iran.