The first engagement between Somalis of the region and the British was in 1825 and ended violently. This culminated in the Battle of Berbera and a subsequent trade agreement between the Habr Awal and the United Kingdom. This was followed by a British treaty with the Governor of Zeila in 1840. An engagement was then started between the British and elders of Habar Garhajis and Habar Toljaala clans of the Isaaq in 1855, followed a year later by the conclusion of the "Articles of Peace and Friendship" between the Habar Awal and East India Company. These engagements between the British and Somali clans culminated in the formal treaties the British signed with the henceforth 'British Somaliland' clans, which took place between 1884 and 1886 (treaties were signed with the Habar Awal, Gadabursi, Habar Toljaala, Habar Garhajis, Esa, and the Warsangali clans), this paved the way for the British to establish a protectorate in the region referred to as British Somaliland. The British garrisoned the protectorate from Aden and administered it as part of British India until 1898. British Somaliland was then administered by the Foreign Office until 1905, and afterwards by the Colonial Office.