section_path: Progress of the war/Final years of the war/Sinai and Palestine campaign (1917–1918)
section_name: Sinai and Palestine campaign (1917–1918)
paragraph_text: Sinai and Palestine campaign (1917–1918)
  
  In March and April 1917, at the First and Second Battles of Gaza, German and Ottoman forces stopped the advance of the Egyptian Expeditionary Force, which had begun in August 1916 at the Battle of Romani. At the end of October 1917, the Sinai and Palestine campaign resumed, when General Edmund Allenby 's XXth Corps, XXI Corps and Desert Mounted Corps won the Battle of Beersheba. Two Ottoman armies were defeated a few weeks later at the Battle of Mughar Ridge and, early in December, Jerusalem had been captured following another Ottoman defeat at the Battle of Jerusalem. About this time, Friedrich Freiherr Kress von Kressenstein was relieved of his duties as the Eighth Army's commander, replaced by Djevad Pasha, and a few months later the commander of the Ottoman Army in Palestine, Erich von Falkenhayn, was replaced by Otto Liman von Sanders.
  
  In early 1918, the front line was extended and the Jordan Valley was occupied, following the First Transjordan and the Second Transjordan attacks by British Empire forces in March and April 1918.