Dunsterforce fought in Mesopotamia in an attempt to keep the Turks and the Bolsheviks out of Persia and Transcaucasia by rearming and leading those elements of the old Russian imperial army that were still prepared to fight following its collapse. The mission was set up by Major General Lionel Dunsterville in 1918 with the purpose of organising the forces of the Transcaucasian Democratic Federative Republic comprising—Armenia, Azerbaijan and Georgia—to enable them to withstand a Turkish attack. Their task was often impeded by civil war, and in May 1918, Armenia, Azerbaijan and Georgia separately declared their independence. Dunsterforce assumed a more direct military role when Baku was threatened by Turkish attack at the Battle of Baku. In August 1918 it was reinforced by about 1,000 British infantry and occupied the town to prevent the port and nearby oil-fields from falling. Despite initial success Baku was evacuated the following month, due to the vastly superior numbers of the Turkish force. The British returned after the armistice, and remained as an occupying force until September 1919. 48 Australian officers and NCOs were attached to Dunsterforce.