EVEN WHERE THE ATLANTIC SLAVE TRADE HAD NOT COMPOUNDED THE difficulties, underpopulation had retarded Africa's development and obstructed attempts to overcome political segmentation by creating enduring states. Between the fifteenth and nineteenth centuries almost every part of the continent was drawn into a world economy dominated by Europe and a political order dominated by the growing use of firearms. These both threatened African peoples and gave them new techniques and opportunities to overcome segmentation, techniques that supplemented ancient strategies and new devices of African invention. Ultimately most attempts to enlarge the scale of economic organisation and political loyalty in nineteenth-century Africa failed, partly because European aggression overwhelmed them, but also because they did not meet the underlying problem of underpopulation, often rather compounding it by the demands they placed on existing populations. Beneath the surface, however, more profound changes took place. For the first time, certain regions escaped ancient constraints and embarked on rapid population growth. Others, by contrast, experienced demographic stagnation or decline comparable to Angola'. This regional diversity – the lack of an overall continental trend – was a major feature of nineteenth-century Africa and makes it necessary to treat each region in turn: first the north, then the Islamic west, the south, and finally the east.
The incorporation of North Africa (excluding Morocco) into the Ottoman empire began in 1517, when Turkish musketeers defeated Egypt's outdated Mamluk cavalry in twenty minutes. Further west, Turkish privateers contested theMaghribian coastline with local rulers and Iberian invaders until anOttoman force took Tunis in 1574 and made it a provincial capital, along with Tripoli and Algiers. During the next two centuries, control from Istanbul weakened to the advantage of provincial forces. In Egypt the army so overawed the governors that they turned for support to the survivingMamluks, whose leaders (knownas beys) regained predominance in the eighteenth century. In Tunis and Tripoli, where Ottoman garrisons were recruited from the soldiers’ children by local women, military commanders founded semi-independent dynasties in 1705 and 1711, respectively. In the frontier province of Algiers, by contrast, the soldiers remained more alien, electing an officer as dey and governing the hinterland by using favoured tribes to extract taxes from the others.