On 11 March 1917, after the Fall of Baghdad to the British Army, the Ottoman Army assembled an Army Group codenamed "Yildirim" to recover Baghdad. The German Army increased the strength of the detachments with the Ottoman troops by despatching a second expedition, "Pasha II" under Major General Werner von Frankenberg zu Proschlitz, in August. Following Ottoman defeats in the Battle of Beersheba and Third Battle of Gaza in late October, the Yildirim Army Group was diverted to prevent further collapse in Palestine. After the capture of Jerusalem by the British in December, further reinforcements were despatched, including substantial fighting ground formations.