until the early nineteenth century, algeria or the regency of algiers was part of the ottoman empire. the area was governed by local governors called dey. the population was made up largely of arabs and berbers, but there were other tribal communities spread throughout the provinces and the sahara. after the french revolution and the defeat of napoleon bonaparte at the battle of waterloo in 1815, the french republic had bought 8 million francs worth of grain from the algerians. that was to be refunded later, which did not happen.