After the Battle of Baku, the Dunsterforce withdrew to Persia in September 1918. The Dunsterforce returned to Baku after the Armistice of Mudros ended the conflict with the Ottoman Empire in November 1918. The force administered the territory under martial law until 1920, when the Bolshevik advance made it impossible for them to stay.