Although the Armenians managed to inflict a defeat on the Ottomans at the Battle of Sardarapat, the fight with the First Republic of Armenia ended with the Treaty of Batum in June 1918. Throughout the summer of 1918, under the leadership of Andranik Ozanian, Armenians in the mountainous Nagorno-Karabakh region resisted the Ottoman 3rd army and established the Republic of Mountainous Armenia. The Army of Islam, consisting of 14,000 men, avoided Georgia and marched to Baku, driving out the 1,000 Australian, British, Canadian and New Zealand troops in 14 September 1918 at the Battle of Baku.