Emirate of Algiers

The Emirate of Algiers was an emirate founded by the Thâaliba   after the weakening of the central authority of the Banu Ziyan state, and the negative impact on the situation in Algeria, which was divided into small, disjointed emirates, such as the Emirate of Jebel Kuku in the Kabylia region, the Emirate of the Zouaoua in Hodna and Zab, the Emirate of the Beni Jelab in Touggourt and Wadi Righ, and the Emirate of the Beni Mezzoug in Noufique on the western border, and the kingdom ended by turning into the Ottoman state.

Thâalibas
The Thâalibi (also referred to as Thâalibas) dynasty ruled the Emirate of Algiers from the mid-14th century to the early 16th century. Though not as prominent as some of the later Algerian rulers, the Thâalibi period laid the groundwork for Algiers' rise as a major power in the region.

Rise of the Emirate
Information about the Emirate's origins is somewhat unclear. It emerged following the decline of the Zayyanid dynasty in the 13th century, with Algiers likely gaining independence sometime in the mid-14th century. The Thâalibi family came to power during this period, establishing a hereditary emirate.

Capture of Algiers (May–September 1516)
In 1510, the Spanish gained a foothold near Algiers by controlling a small island and forcing the ruler, Salim at Toumi, to submit. Salim even had to travel to Spain and pledge allegiance to their king.

Fast forward to 1516. Sālim, desperate to get rid of the Spanish, invited the Ottoman corsair brothers, Oruç and Hayreddin Barbarossa, for help. Oruç arrived with a combined force and local support, but failed to capture the Spanish-held island.

Things took a turn when Oruç suspected Sālim of working with the Spanish. He ordered Sālim's execution.

This power struggle wasn't over though. Sālim's son escaped to Spain and found an ally in King Charles V. This alliance set the stage for future clashes between the Ottomans and the Spanish in the region.

Spanish expedition to Algiers
In 1510, Spain established a foothold near Algiers by controlling a small island and forcing the city's ruler, Sālim al-Tūmī, to submit. Seeking to expel the Spanish, al-Tūmī invited the Ottoman corsair brothers, Oruç and Hayreddin Barbarossa, for help in 1516.

Forces

 * Ottomans: Led by Oruç Barbarossa, with only 1,500 men. His force included:
 * Turkish companions
 * Andalusian immigrants skilled in firearms ("Fauquefels")
 * City inhabitants (initially believed to support the Spanish)
 * Spanish and Moors: A combined force of 25,000, including:
 * 10,000-15,000 Spanish soldiers
 * 10,000 Moors from Ténès

Ouruç's Plan
Source:
 * Allow the enemy to land with minimal resistance.
 * Utilize city fortifications and ambush tactics to wear down the Spanish.
 * Launch a full-scale attack when the Spanish were exhausted.

Spanish Plan

 * Land and establish a camp on the coast.
 * Capture the high ground overlooking Algiers.
 * Coordinate with Ténès's army for a combined assault.

The Battle

 * Spanish troops made a tactical error by climbing the heights in scattered formations, ignoring warnings.
 * Oruç's forces harassed them from higher ground during the ascent.
 * The promised army from Ténès never arrived, demoralizing the Spanish.
 * Oruç launched a coordinated attack from the city and surrounding areas.
 * The Spanish retreated in chaos, suffering heavy losses during a subsequent storm.

Outcome
Oruç's strategic use of terrain and his well-trained force, despite being outnumbered, secured a decisive victory against the Spanish and Moorish army. This battle marked the rise of Ottoman influence in North Africa.

Assassination of Salim at Toumi
Salim at-Toumi (Arabic: سالم التومي) was a ruler of the Emirate of Algiers in the early 16th century. He was the leader of the Thaâliba tribe. The city's merchants gave him power.

According to some accounts, he was married to Zaphira, a princess. Spain threatened Algiers, and Salim at-Toumi agreed to pay them tribute. The people of Algiers wanted help from the pirate brothers, the Barbarossas. Salim at-Toumi lost power and the Barbarossas took over. Arudj Barbarossa killed Salim at-Toumi.

Suicide of Princess Zaphira
In order to exonerate himself in Zaphira's eyes, Aruj paid false witnesses to name fake assassins of Selim, who confessed under torture before being strangled. The regent sent a letter to Zaphira, recounting how he had the true murderers of her husband assassinated. But Zaphira responded that she would rather commit suicide in the face of his tyranny if he did not allow her to leave Algiers.

Aruj visited Zaphira, who stood up to him. Irritated, Aruj gave her one more day before marrying her. The next day, Aruj returned determined to marry her. When she refused him again, he attempted to rape her. Having hidden a dagger under her robe, Zaphira tried to kill him but only managed to wound his arm. Aruj called someone to disarm her, but Zaphira poisoned herself with a vial she had also concealed in her robe. The regent had Zaphira's loyal servants strangled and buried with their mistress.

Literature

 * In 1754, the tragedy Barbarossa by John Brown is based on the story of Aruj Barbarossa and Zaphira. However, in this version, Zaphira defeats Barbarossa, and her legitimate heir succeeds Selim.
 * In 2007, Abdelaziz Ferrah published a fictionalized version her life, Zaphira, ou la bataille pour Alger, 1516.

Film
In 2023, the film "La Dernière Reine" (The Last Queen), an Algerian film directed by Damien Ounouri and Adila Bendimerad, depicts Zaphira's resistance against Aruj. The co-director plays the title role, and Dali Benssalah portrays Aruj Barbarossa.