Between May and December 1916, the 13th (Western) Division refitted and re-equipped in preparation for the drive northward to capture Baghdad. In July, Major-General Maude was elevated to command the expanded and renamed Mesopotamian Expeditionary Force. In his place, Brigadier General Cayley, formerly the commander of the 39th Brigade, was elevated to command of the division. On 12 December 1916, the division advanced from Sheik Sa'ad on Kut. At the Second Battle of Kut, the division helped drive the Ottoman forces from the town. After a brief pause, the division drove north, crossing the Diyala River, and participated in the capture of Baghdad on 11 March 1917. Following the capture of Baghdad, the 13th (Western) Division fought a number of battles to consolidate British control over the Baghdad vilayet. This included fighting at Dellis Abbas (27–28 March 1917), Duqma (29 March 1917), Nahr Kalis (9–15 April 1917), the passage of the Adhaim (18 April 1917) and the action of the Shatt al 'Adhaim (30 April 1917). Despite the relative inaction of the British to advance further, the division also fought at the Second and Third Action of Jabal Hamrin (16–20 October 1917 and 3–6 December 1917).