As early as the seventh century, parts of Botswana were populated by thriving agricultural communities. In the 14th century, the powerful Tswana dynasties took control, originating in the region to the east – today South Africa's Gauteng Province. A further series of migrations followed the break-up of the main Tswana kingdoms, the Hurutshe and the Kwena, from the late 17th century. These migrants were firmly established in the southern part of Botswana, and, by the 18th century, had established a powerful military state controlling hunting, cattle-breeding and copper mining. The 19th century brought another period of upheaval, as peoples from the north, dislocated by slavery and the collapse of their local economies, moved to new territory. British colonialists and Boer settlers fought for control of Botswana; the local rulers allied themselves with the British against the Boers, and Botswana was eventually brought under British protectorate control in 1890, remaining so until independence in 1966. Popular Seretse Khama became the country's first president – a position he held until his death in 1980. Today, Botswana’s key domestic priority is to tackle the HIV/AIDS pandemic. Botswana's infection rate, estimated at 20 per cent of the total population, is among the world's highest.