We know that, while not an existential threat, the Berber tribes of Northern Africa were prone to raiding the frontier and coupled with their presence and the natural barriers of Africa, settlements/cities/population centres had to hug the coasts.
But what of Egypt, how much of the border...