The first written records relating to modern-day Botswana appear in 1824. What these records show is that the Bangwaketse had become the predominant power in the region. Under the rule of Makaba II, the Bangwaketse kept vast herds of cattle in well-protected desert areas, and used their military prowess to raid their neighbours. Other chiefdoms in the area, by this time, had capitals of 10,000 or so and were fairly prosperous. This equilibrium came to end during the Mfecane period, 1823–1843, when a succession of invading peoples from South Africa entered the country. Although the Bangwaketse were able to defeat the invading Bakololo in 1826, over time all the major chiefdoms in Botswana were attacked, weakened, and impoverished. The Bakololo and AmaNdebele raided repeatedly and took large numbers of cattle, women, and children from the Batswana—most of whom were driven into the desert or sanctuary areas such as hilltops and caves. Only after 1843, when the Amandebele moved into western Zimbabwe, did this threat subside.