Realm Europe 1015–1249 CE

Taifa of Almería

Southeastern Iberian silk-port kingdom where Slavic-born emirs ruled five thousand looms until Sevillian and Almoravid armies closed in.

Built from 5 cited sources, 3 rulers, 5 turning points and 4 cities.

Taifa of AlmeríaAlmeria
1015–1249 CE · peak 1037 CE

Severed from the collapsing Caliphate of Córdoba around 1012–1015, the Taifa of Almería held the southeastern Iberian coast from its port capital at Almería across territory reaching toward Granada, Murcia, and Cartagena. Its founder-figure Khayran, a former governor of the city under the Caliphate and one of the Slavic military men who dominated the post-Caliphal south, took Almería by siege and made himself the first fully independent emir of Almería and Cartagena after the disputed two-year rule of the Slavic governor Ibn Aflah.

Khayran expanded and fortified the Alcazaba, the palace-fortress crowning the city, and enlarged the great mosque of Almería, anchoring a reign of documented prosperity. The port grew as the export gate for the taifa's luxury manufactures: a textile industry of around five thousand looms made Almería a major silk center, and commerce with other parts of Europe ran alongside minting of dirhams and dinars. Poets served at court, including the vizier Abu Asbag ibn Arqam of Guadix under Emir al-Mu'tasim.

The city's population spoke Arabic, Mozarabic, and Hebrew, and Muslims, Catholics, and Jews lived under the monarchy's rule, with Mozarabic still mapped across the surrounding countryside. Slavic-born commanders and their households stood atop the military hierarchy, while thousands of weavers, dyers, porters, and sailors kept the looms and harbor working; the silk trade that sustained them endured in the region until the expulsion of the Muslims in the early seventeenth century.

Repeated campaigns by the Taifa of Seville ate away Almería's northern territory, and emirs of Granada, Seville, and Valencia tried repeatedly to swallow the small kingdom. Zuhayr's alliance with Granada let him occupy Córdoba itself in 1035, the height of Almerian expansion, but his attempt to dominate his Granadan allies provoked a revolt among his own troops and his death in 1038. Valencia's Emir Abd al-'Azīz then annexed the taifa from 1038 to 1041, until his governor Ma'n—Abu Yahyà Muhammad ibn Ma'n—re-declared independence. Almoravid armies absorbed the kingdom in 1091, holding it until 1140, before Castile annexed it in 1147.

The Taifa of Almería took shape in the years after the Caliphate of Córdoba broke apart in 1010, when the Umayyad state that had ruled much of al-Andalus fragmented into rival petty kingdoms known as taifas. Almería's independence is dated to around 1012, though historians still argue over the precise moment. Some scholars say the city was already autonomous under the Slavic governor Ibn Aflah, whose two-year rule was shadowed by Córdoban influence. Others place the decisive break when Khayran, a former Almerian governor under the Caliphate, returned and took the city by siege. Whichever date one accepts, the realm that followed was a Muslim Arab-ruled principality on the southeastern coast of Iberia, centred on Almería and its port, and it endured until the Almoravid annexation of 1091 and its final incorporation into Castile in 1147.

Almería's position mattered as much as its rulers. Its harbour gave the emirs a window onto Mediterranean trade, and its hinterland supplied raw materials for a textile economy that made the city a significant centre of silk weaving. The number of looms cited in later accounts, around five thousand, suggests a workforce far larger than a single palace workshop, and the luxury cloth produced there moved through the port to other parts of Europe. Pressure from Granada, Seville and Valencia meant that the emirs spent much of their history negotiating, fighting, or buying peace, and their small state survived by exploiting the rivalries of its larger neighbours.

Wars & turning points

Rulers & characters

  • Khayran dates unattested [3]
    Emir of Almería and Cartagena · Local Almerian emirate after the Caliphate of Córdoba

    Khayran is named as the first fully independent Emir of Almería and Cartagena. A former governor of Almería under the Caliphate, he returned and took the city by siege, securing its break from Córdoba. His reign is remembered for infrastructure: he expanded and fortified the Alcazaba, the palace of Almería, and invested in enlarging the city's great mosque. Under him the port began to gain importance as the outlet for luxury goods manufactured in the city.

    He had once governed Almería for the Caliphate he later defied, so his independence was won by a man who already knew the city from the inside.

  • Zuhayr dates unattested [3]
    Ruler of Almería during its expansion

    Zuhayr pursued the most ambitious policy in the realm's history. He allied with the Taifa of Granada against Seville, which enabled him to occupy Córdoba in 1035, the high-water mark of Almerian expansion. He then alienated his Granadan allies by trying to seize complete control of the alliance. A revolt among his own troops followed, and he died in 1038, leaving a power vacuum that the Valencian emir Abd al-'Azīz exploited.

    Follow Zuhayr
  • Abu Yahyà Muhammad ibn Ma'n dates unattested [3]
    Powerful local emir of Almería

    Named among the powerful local emirs who gave Almería its historical splendour, Ibn Ma'n is documented as the governor sent by the Valencian king who afterwards declared Almería independent again during the brief period of Valencian occupation. His restoration of autonomy is one of the realm's recurring patterns: a governor installed from outside repeatedly becoming the founder of a local independence.

    Follow Abu Yahya Muhammad al-Mu'tasim

Wars, rebellions & turning points

  1. Shock Collapse of the Caliphate of Córdoba [3][2]

    The breakup of the Umayyad caliphate left al-Andalus divided among rival local rulers. Almería, previously a provincial seat under Córdoba, began the process that led to its independence around 1012.

    Outcome: Created the political space in which the Taifa of Almería emerged as an independent kingdom.

    Follow taifa
  2. War Almerian occupation of Córdoba [3]
    Taifa of Seville

    Zuhayr allied with the Taifa of Granada against Seville and used the alliance to occupy the city of Córdoba. The campaign was the height of Almerian expansion, but Zuhayr then tried to seize control of the coalition, offending his Granadan partners.

    Outcome: Marked the peak of Almerian power; it was followed by a revolt among Zuhayr's own troops.

    Follow Zuhayr
  3. Shock Valencian occupation of Almería [3]
    Taifa of Valencia

    After Zuhayr's death in 1038 left a power vacuum, the Valencian emir Abd al-'Azīz occupied Almería. The city remained under Valencian control for a short period before the local governor Ibn Ma'n restored independence.

    Outcome: Interrupted Almerian sovereignty for a few years; independence was declared again afterwards.

    Follow
  4. Shock Annexation by the Almoravid dynasty [3][2]
    Almoravid dynasty

    The Almoravid empire absorbed Almería along with the other taifas, ending the emirate's independence after roughly eight decades of self-rule.

    Outcome: Brought Almería under Almoravid rule; the independent taifa period ended.

    Follow
  5. Shock Annexation by Castile [3][2]

    Almería passed into Castilian hands in 1147, closing the long chapter of Muslim Almerian rule in the region.

    Outcome: Ended the Taifa of Almería as a political entity.

    Follow

Achievements & reckoning

Achievements

  • Fortified Alcazaba and enlarged great mosque [3]

    Under Khayran the Alcazaba, the palace of Almería, was expanded and fortified, and the city's great mosque was enlarged. These works gave the emirate a defended royal seat and a major religious building that reflected the city's prosperity. They were the material expression of the independence Khayran had won.

  • Textile and silk workshops feeding long-distance trade [3]

    Almería developed a major textile industry, with sources citing around five thousand looms, and it was a centre of silk production. The output was exported through the port to other parts of Europe, creating commerce that lasted until the expulsion of Muslims in the early seventeenth century. Silk was a costly fibre, so the trade shows how the emirate turned its harbour into a source of revenue.

  • Strategic harbour and export economy [3]

    The port of Almería grew in importance during Khayran's reign as the channel through which the city's luxury manufactures reached outside markets. Its harbour made the emirate a maritime as well as an inland power, and its strategic location helped it survive repeated attempts at conquest by larger neighbours.

Reckoning

  • Zuhayr's overreach and the revolt that killed him [3]

    Zuhayr's coalition with Granada brought Almería its greatest reach, including the occupation of Córdoba, but his attempt to take total control of the alliance alienated his partners. Revolt among his own troops ended in his death in 1038. The episode shows how the emirate's expansion depended on personal authority that could collapse quickly.

    Follow Zuhayr
  • Repeated attacks from Granada, Seville and Valencia [3]

    The emirs of Granada, Seville and Valencia each tried many times to conquer the small kingdom. Its independence held except for a short Valencian occupation, but the constant pressure from larger neighbours drained its resources and forced it into shifting alliances. Its survival depended on exploiting their rivalries rather than on any decisive military superiority.

    Follow
  • Loss of northern territory to Seville [3]

    Several campaigns by the Taifa of Seville reduced Almería's territory in the north, shrinking the emirate's agricultural and political base even before the Almoravid conquest. Each lost district weakened the revenues that funded its fortifications and port works.

    Follow

Deeper cuts

Art [3]

A green-and-white banner praised in verse

The Taifa of Almería flew a flag with two green transverse stripes and a white stripe between them, and it is recorded as the first flag of Andalusia known to history and one of the earliest flags in Europe. Its design passed to later green-and-white flags used across southern Iberia, including those of the Kingdom of Granada, which kept a red main banner but also carried many green-and-white standards. When Abu Asbag ibn Arqam, a poet from Guadix who served as vizier of King al-Mu'tasim, saw the flag over the Alcazaba, he composed a poem now regarded as the oldest written description of a flag in Europe. The emblem did not vanish with the emirate: after the defeat of Granada, twenty flags were taken, eighteen of them green and white, and the Almerian design remained the flag of Castilian troops in Andalusia. In the nineteenth century it was adopted by the Andalusian nationalist movement, and after the statute of autonomy of the early 1980s it became the official flag of Andalusia.

The vizier's poem praises the green flag as a wing of bliss over the Alcazaba, a line that makes a cloth banner into a literary object.

Trade [3]

Silk, looms and a harbour that exported luxury

Almería's economy rested on textiles. Its silk industry and its many looms, cited in the region's sources as around five thousand, made the city a manufacturing centre rather than merely a market. The finished luxury goods flowed out through the port, which grew in importance under Khayran, linking the emirate to commerce with other parts of Europe. This trade persisted for centuries, continuing until the expulsion of Muslims in the early seventeenth century. The city's wealth therefore came from the coupling of skilled weaving with a deep-water harbour, a combination that made Almería both productive and strategically valuable to its larger rivals.

Daily life [3]

A palace and mosque rebuilt as a statement of independence

The public works of the Almerian emirs served practical and symbolic ends. When Khayran expanded and fortified the Alcazaba and invested in the great mosque, he was building the physical setting of a newly sovereign city. The royal palace on its height and the enlarged congregational mosque gave residents a visible sign that Almería no longer answered to Córdoba. For urban residents, the emirate's independence meant tangible changes: the defence of their city, the working of the port, and the rhythm of a community built around a central mosque and a fortified seat of government.

Structural lenses

Drafted by GPT-6 Luna (lens-v1.1) from the cited sources.

Material & archaeology [3]

Khayran’s Fortified Alcazaba and Enlarged Mosque

After taking Almería, Khayran invested in the city’s built core: he expanded and fortified the Alcazaba, the palace-fortress, and enlarged the great mosque. These projects strengthened the ruler’s stronghold while extending the city’s principal religious complex.

Trade & fiscal [3]

Five Thousand Looms and the Silk Export Port

Almería’s textile economy centered on roughly five thousand looms and a silk industry whose luxury fabrics moved through the city’s harbor into commerce with other parts of Europe. The port linked local manufacture to overseas buyers and helped make textiles a major source of the city’s prosperity.

Thought & mind [3]

A Vizier’s Poem on Almería’s Green-and-White Banner

Abu Asbag ibn Arqam, a poet from Guadix serving as vizier to al-Mu'tasim, described the banner above Almería’s Alcazaba in verse. The poem turns its colors and movement into images of morning, fortune, and victory, and is regarded as Europe’s oldest written description of a flag.

The poem calls the banner’s white stripe the “white morning glow” and says its flutter guarantees good luck in victory.

Underappreciated & strange truths

Standing before the Alcazaba, vizier-poet Abu Asbag ibn Arqam saw Almería's green-and-white striped flag flying and wrote what is regarded as the oldest written description of a flag in Europe: 'The green flag spread over you the wing of bliss, it made its wišāḥ of the white morning glow.'

  • Europe's oldest written flag description was a poem [3]

    The earliest written description of a flag in Europe, as commonly cited, is not a chronicle or decree but a poem by Abu Asbag ibn Arqam, vizier to King al-Mu'tasim. He praised the green and white banner over the Alcazaba, comparing it to a wing of bliss and to the heart of an enemy as it snapped in the wind.

  • A regional flag outlived its kingdom by centuries [3]

    The Almerian green-and-white design survived the emirate's annexation, was carried by Castilian troops in Andalusia, was adopted by a nineteenth-century Andalusian nationalist movement, and became the official flag of Andalusia after the early 1980s statute of autonomy. A banner first raised over a small emirate thus ended up identifying a modern autonomous community.

  • A governor who restored independence [3]

    During the brief Valencian occupation, a governor sent by the Valencian king, Ibn Ma'n, afterward declared Almería independent again. An official installed to hold the city for an outside power ended up becoming the founder of its renewed autonomy.

State ledger

Lifespan
1015–1249 CE
Peak territory
20,948 km²
Capital
Almería
Seshat ID
es_taifas

Connected world

Born from the fracture of the Caliphate of Córdoba, Almería's silk and port commerce linked it to European markets across the Mediterranean, while its green-and-white banner prefigured flags of the later Kingdom of Granada and modern Andalusia.

Drafted by Beam (links-v2.0) from the cited sources.

  • war Caliphate of Córdoba → c. 1012–1035 CE [3]

    Almería declared independence from the Caliphate of Córdoba around 1012; Khayran, a former governor under the Caliphate, took Almería by siege, and Zuhayr occupied Córdoba in 1035.

  • war Taifa of Seville → 11th century CE [3]

    Campaigns by the Taifa of Seville diminished Almería's territory in the north; Zuhayr allied Almería with Granada against Seville.

  • vassalage Taifa of Valencia → 1038–1041 CE [3]

    From 1038 to 1041 Almería belonged to the Taifa of Valencia after Abd al-'Azīz occupied it; the Valencian governor Ma'n then declared Almería independent.

  • vassalage Almoravid Dynasty → 1091 CE [3]

    Almería remained independent until the arrival of the Almoravid dynasty, which ended its independence in 1091.

Drafted by Fireworks Firerouter (polity-v1.5) from five cited sources · almanac by Claude Haiku 5.5 (almanac-v1.2) · deep lenses by GPT-6 Luna (lens-v1.1), and checked that every citation points to one of them. See the evidence How AI is used

IXCities & tongues

Mapped cities & trade towns

CityCountryNear peakPeak pop.GrowthGlobe
GranadaSpain36k200k (1476 CE) Locate →
AlmeriaSpain34k47k (1900 CE) Locate →
CartagenaSpain33k78k (1900 CE) Locate →
MurciaSpain19k206k (1950 CE) Locate →

Languages across the footprint

LanguageFamilyMacroareaHorizon
MozarabicIndo-EuropeanEurasiaGlottolog 5.3

XArchives & dossiers

Dossiers across this ground

XICulture & letters

Primary works, letters & books

No matching primary books indexed for this span yet.

XIISources & provenance

  1. Cliopatria Historical Polity Borders v0.2.0 (Seshat Databank). CC-BY-4.0.
  2. Wikidata Historical Entities & Lineage Spine. CC0-1.0.
  3. Wikipedia — Taifa of Almería. CC-BY-SA-4.0.
  4. Reba / Chandler Historical Urban Population Estimates (3700 BCE–1975 CE). CC-BY-4.0.
  5. Glottolog 5.3 Global Language & Family Classification. CC-BY-4.0.