The Sinai and Palestine campaign of the Middle Eastern theatre of World War I was fought by the Arab Revolt and the British Empire, against the Ottoman Empire and its Imperial German allies. It started with an Ottoman attempt at raiding the Suez Canal in 1915, and ended with the Armistice of Mudros in 1918, leading to the cession of Ottoman Syria. Fighting began in January 1915, when a German-led Ottoman force invaded the Sinai Peninsula, then part of the British Protectorate of Egypt, to unsuccessfully raid the Suez Canal. After the Gallipoli campaign, British Empire veterans formed the Egyptian Expeditionary Force (EEF) and Ottoman Empire veterans formed the Fourth Army, to fight for the Sinai Peninsula in 1916. In January 1917 the newly formed Desert Column completed the recapture of the Sinai at the Battle of Rafa. This recapture of substantial Egyptian territory was followed in March and April by two EEF defeats on Ottoman territory, at the First and Second Battles of Gaza in southern Palestine. After a period of stalemate in Southern Palestine from April to October 1917, General Edmund Allenby captured Beersheba from the III Corps. The Ottoman defences were captured by 8 November, and the pursuit began. EEF victories followed, at the Battle of Mughar Ridge, 10 to 14 November, and the Battle of Jerusalem, 17 November to 30 December. Serious losses on the Western Front in March 1918, during Erich Ludendorff's German spring offensive, forced the British Empire to send reinforcements from the EEF. The advance stalled until Allenby's force resumed the offensive during the manoeuvre warfare of the Battle of Megiddo in September. The successful infantry battles at Tulkarm and Tabsor created gaps in the Ottoman front line, allowing the pursuing Desert Mounted Corps to encircle the infantry fighting in the Judean Hills and fight the Battle of Nazareth and Battle of Samakh, capturing Afulah, Beisan, Jenin and Tiberias. In the process the EEF destroyed three Ottoman armies during the Battle of Sharon, the Battle of Nablus and the Third Transjordan attack, capturing thousands of prisoners and large quantities of equipment. Damascus and Aleppo were captured during the subsequent pursuit, before the Ottoman Empire agreed to the Armistice of Mudros on 30 October 1918, ending the Sinai and Palestine campaign. The British Mandate of Palestine and the Mandate for Syria and the Lebanon were created to administer the captured territories. The campaign was