Egypt was a major battlefield in the North African campaign during the Second World War, being the location of the First and Second Battles of El Alamein. Legally an independent kingdom, and an equal sovereign power in the condominium of Anglo-Egyptian Sudan, in reality Egypt was heavily under the coercive influence of the United Kingdom, a state of affairs that had persisted since the United Kingdom intervened militarily in the Orabi Revolt in favour of Egypt's Khedive, Tewfik Pasha, in 1882, subsequently occupying the country. The continuing British dominance of Egyptian affairs, including British efforts to exclude Egypt from the governance of Sudan, provoked fierce Egyptian nationalist opposition to the United Kingdom. Consequently, despite playing host to thousands of British troops following the outbreak of the conflict, as it was treaty bound to do, Egypt remained formally neutral during the war, only declaring war on the Axis powers in the spring of 1945. Though escaping the fate of Iraq, and Iran, both of whose governments were toppled by the United Kingdom during the war (the latter in conjunction with the Soviet Union), Egypt experienced the Abdeen Palace Incident, a confrontation between Egypt's King Farouk and the British military in 1942, the results of which would contribute directly to the Egyptian Revolution of 1952 a decade later.