At the same time (effectively from 8 March 1918), the Ottoman command changed. The highest level Ottoman headquarters in Palestine was the Yıldırım Army Group. The Army Group had originally been formed to recapture Baghdad which had been captured by the British in March 1917. Instead, it had been diverted to Palestine where the British were close to capturing Jerusalem. The Army Group's commander was the German General Erich von Falkenhayn, who wished to continue a policy of "yielding defence" rather than hold all positions at all costs. He was also prepared to retreat to shorten his lines of communication and reduce the need for static garrisons. However, he was unpopular among Ottoman officers, mainly because he relied almost exclusively on German rather than Ottoman staff officers, and was blamed for the defeats at Gaza and Jerusalem. He was replaced by another German General, Otto Liman von Sanders, who had commanded the Ottoman defence during the Gallipoli Campaign. Liman reasoned that continued retreat in Palestine would demoralise the troops, ruin their draught animals, encourage the Arab Revolt to spread further north into the Ottoman rear areas and also lead to all the Ottoman forces to the south in the Hejaz being finally isolated. His forces halted their retreat and dug in to resist the British, even reoccupying some ground near the Jordan as Allenby's two raids across the Jordan were repulsed.