The Barbarossa Brothers Aruj and his younger brother Hizir (Kheir) were born in Greece in the 1470's. Aruj began his career by attacking Aegean ships from his home island of Lesbos. After being freed from slavery to the Knights of Rhodes by Egyptian forces, he began working with his brother Hizir out of the port of Alexandria with ships provided by the local ruler.
After moving to the Western Mediterranean around 1505, they flooded the base of Djerba with plunder from merchant and warships alike. Several years later, they moved to the port of Djidjelli near Algiers after a fallout with the Sultan of Tunis, and stepped up their attacks on the Spanish, which included raiding more coastal towns and forts.
Aruj took advantage of disfavor among the locals toward the Algerian Sultan's policies and assumed his position after invading the port of Algiers and killing him in 1516. After two years of conflict with local areas still controlled by the Spanish, Aruj was killed while trying to escape a siege in the town of Tlemcan, and his brother Hizir assumed control.
As Hizir ascended to the position of Sultan of Algiers through alliance with the Ottoman Emperor Sulayman I, he was able to command Ottoman resources to both defend his territory and sack Spanish-held areas, such as the towns of Majorca and Nice. He died around 1547, having gained control of a large portion of North Africa and solidifying Ottoman rule over almost the entire Mediterranean. A more detailed account of the Algerine Corsairs by Charles Ellms is here.