The battalion remained in Mesopotamia for the rest of war, participating in the recapture of Kut. Once a further offensive was approved, 5th Wilts became one of the first two battalions to cross the Diyalah River, breaking the Turkish defences containing the initial crossing attempt by the 6th (Service) Battalion, Loyal North Lancashire Regiment. Following the Diyala crossing, the battalion participated in the fall of Baghdad, and operations north of there. With the signing of the Armistice, the battalion demobilized in 1919.